Table of Contents

assert

Description

Test a boolean value, and if false, display an error message and halt script execution.

Function prototype

void assert <bool:Condition> <string:Message>

Arguments

Name Type Comment
Condition bool The boolean value to be tested.
Message string The string of text to be displayed if Condition is false.

Return value

None.

Example

// create an integer
new int "i"

// set it to 9
set i 9

// and assert if 'i' is not greater than 10
assert <zs:isgt i 10> "'i' must be greater than 10"

Comments

None.

See also