Closed zongz1024 closed 5 years ago
What you show in the screenshot can be done in SDL with a DECISION
symbol:
Or using a ternary operator in a TASK
symbol:
someint := if someint > 0 then someint + 1 else someint - 1 fi
The DECISION
is also used for switch-case
:
And for ranges:
Loops can be done either using decisions and label/join:
Or using the "for" construct in a TASK
symbol (warning: this is an extension to SDL, it will not work in other tools). The syntax is close to Python loops, and there are two variants:
for each in range (10) : // range operator has the same syntax as the one in Python
call writeln(each);
endfor
and:
for each in someArray :
// list of statements
endfor
Sorry to bother you again.
And, I also want to ask how to express "switch", "do-while" and "while" in the TASK in OpenGEODE.
Really thanks! A great help for me!
Sorry to bother you again.
And, I also want to ask how to express "switch", "do-while" and "while" in the TASK in OpenGEODE.