Control Blocks

Control Blocks

if

Tests a given condition. If the condition is true, performs the actions in a given sequence of blocks; otherwise, the blocks are ignored.

ifelse

Tests a given condition. If the result is true, performs the actions in the then-do sequence of blocks; otherwise, performs the actions in the else-do sequence of blocks.

choose

Tests a given condition. If the condition is true, performs the actions in the then-do sequence of blocks and returns the then-return value; otherwise, performs the actions in the else-do sequence of blocks and returns the else-return value.

foreach

Runs the blocks in the do section for each item in the list in list. Use the given variable name to refer to the current list item.

for range

Runs the block in the do section for each numeric value in the range from start to end, stepping the value each time. Use the given variable name to refer to the current value.

while

Tests the test condition. If true, performs the action given in do, then tests again. When test is false, the block ends.

open another screen

Opens a new screen.

open another screen with start value

Opens a new screen and passes a value to it.

get start value

Returns the start value passed from the previous screen.

close screen

Closes the current screen.

close screen with value

Closes the current screen and returns a value to the screen that opened it.

close application

Closes the application.

get plain start text

Returns the text passed to this app when the app was started, if any.

close screen with plain text

Closes the current screen and passes text to the app that opened this one. For multiple screen apps, use close screen with value rather than this one.