Output Statement
About
Templates use a single section to define the syntax of Output Statements.
Java Example |
[Assign] |
Text |
= System.out.println({Expression}); |
| newline |
|
= System.out.print({Expression}); |
| ~newline |
Text Key
The text key is used to generate the syntax of the Output Statement.
Fields |
Contents |
{expression} |
The expression. The
syntax is generated by the various function/expression sections. |
{list} |
This text is generated by the
[Output List] section. |
The first and last flags can be used if the syntax differs for the first
or last statement in the block.
Flags |
When True |
newline |
The statement has a newline (the default
for Output Statements). |
first |
The statement is the first item in the
block. |
last |
The statement is the last item in the
block. |
Output List
About
In many cases, the output statement requires a list of expressions rather
than a long list of concatenated terms.
C++ Example |
[Output List] |
Separator |
= << |
Text |
= {expression} |
How it works
This section creates a list by refactoring the original expression using
the concatenation operator. Only concatenations at the main expression level
are changed (sub expression are left alone). So, the following Flowgorithm
expression:
"The GCD of " & NumberA & " and " & NumberB & " is " & A |
will be converted into the following list items:
- "The GCD of "
- NumberA
- " and "
- NumberB
- " is "
- A
Separator Key
The Separator defines the text that will be inserted between the list of
arguments names.
Flags |
When True |
first |
The expression is the first item in the
list. |
last |
The expression is the last item in the
list. |
Text Key
The text key is used to generate the syntax of the list.
Fields |
Contents |
{Expression} |
The sub-expression. |
Flags |
When True |
integer |
The expression is an Integer. |
real |
The expression is a Real. |
boolean |
The expression is an Boolean. |
string |
The expression is an String. |
none |
The expression doesn't have a
known type - i.e. not declared. This is good for a "default"
syntax. |
first |
The expression is the first item in the
list. |
last |
The expression is the last item in the
list. |
|