O'Reilly logo

Microsoft Dynamics AX 2009 Programming: Getting Started by Erlend Dalen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Statements and loops

Statements and loops are used to control the execution flow of a program, and without them most programming tasks would be impossible.

In AX, you have access to the following statements and loops:

  • For loop
  • Continue
  • Break
  • While loop
  • Do-while loop
  • If, else if, else
  • Switch

For loop

A for loop can be used if the code at runtime knows how many times it should loop through a piece of code before the loop starts. The pseudo code of a for loop in AX is the same as any for loops in most programming languages that has a relationship with the C programming language. It is actually called a three expression for loop as it is built up by three steps.

The first thing that happens is that you initiate the variable used to increment the for loopincrementation. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required