Main Features Download Documentation Resources

For Statement

About

Templates use a single section to define the syntax of For Statements. It uses a special code to designate where the For Statement's block is inserted..

The following definitions are from a simplified version of the Java Programming Language template. Note that the block's indentation is inceased by 1 level.

Java Example
[For]
Text = for ({Variable} = {Start}; {Variable} <= {End}; {Variable}++) {{ | inc, ~step
= for ({Variable} = {Start}; {Variable} <= {End}; {Variable} += {step}) {{ | inc, step
= for ({Variable} = {Start}; {Variable} >= {End}; {Variable}--) {{ | ~inc, ~step
= for ({Variable} = {Start}; {Variable} >= {End}; {Variable} -= {step}) {{ | ~inc, step
= -->BLOCK | | 1
= end for

Text Key

The text key is used to generate the syntax of the Output Statement.

Fields Contents
{variable} The Name of the loop variable. This defined in [Variable Access].
{name} The name of the loop variable
{Start} Start value of the loop
{End} End value of the loop.
{Step} The step value of the loop. Most basic loops use 1. Note: This cannot be a negative value. Use the "inc" flag to determine direction.

The first and last flags can be used if the syntax differs for the first or last statement in the block.

Flags When True
inc The loop is incrementing (going in a positive direction).
step The step value is not equal to 1.
block  The statement's block contains one or more items.
first The statement is the first item in the block.
last The statement is the last item in the block.

To insert the For Statement's block, use a single line containing the following special codes. If you want to change the indentation of the block, make sure to specify the indent after the second pipe |.

Special value What it does
-->BLOCK Inserts the code generated from the While Statement's block.