If Statement
About
Templates use a single section to define the syntax of If Statements. It
uses two special codes to insert both the True Block and the False (Else)
Block.
The following definitions are from a simplified version of the Java
Programming Language template. Note that each of the sub-blocks increase the
indent by 1.
Java Example |
[Assign] |
Text |
= if ({condition}) {{ |
|
|
|
= -->TRUEBLOCK |
| |
| 1 |
|
= } else {{ |
| else |
|
|
= -->FALSEBLOCK |
| else |
| 1 |
|
= } |
|
|
Text Key
The text key is used to generate the syntax of the Output Statement.
Fields |
Contents |
{condition} |
The conditional expression. The
syntax is generated by the various function/expression sections. |
{not condition} |
The conditional expression negated using
DeMorgan's Law. The
syntax is generated by the various function/expression sections. |
The first and last flags can be used if the syntax differs for the first
or last statement in the block.
Flags |
When True |
block |
The If Statement's true block contains one
or more items. |
else |
The If Statement has a False (Else) Block. In
other words, the "else" branch of the flowchart contains shapes. |
first |
The statement is the first item in the
block. |
last |
The statement is the last item in the
block. |
To insert the True Block and the False (Else) Block, the text, 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 |
-->TRUEBLOCK |
Inserts the code generated from the True
Block of the If Statement. |
-->FALSEBLOCK |
Inserts the code generated from the False
(Else) Block of the If Statement. |
|