O'Reilly logo

Learning MS Dynamics AX 2012 Programming by Erlend Dalen, Mohammed Rasheed

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 most programming tasks would be impossible without them.

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

  • The for loop
  • The continue statement
  • The break statement
  • The while loop
  • The do-while loop
  • The if-else if-else loop
  • The switch statement

The 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 pseudocode of a for loop in AX is the same as any for loop in most programming languages derived from the C programming language. It is actually called a three-expression for loop, since it is made up of three steps:

  1. Initialization of the variable used to increment ...

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