Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

AEL has implementations of 'for' and 'while' loops.

Code Block
context loops { 
    1 => {
        for (x=0; ${x} < 3; x=${x} + 1) { 
            Verbose(x is ${x} !);
        }
    }
    2 => { 
        y=10;
        while (${y} >= 0) { 
            Verbose(y is ${y} !);
            y=${y}-1;
        }
    }
}

NOTE: The conditional expression (the "${y} = 0" above) is wrapped in $[ ] so it can be evaluated. NOTE: The for loop test expression (the "$x 3" above) is wrapped in $[ ] so it can be evaluated.