script
The following is a list of functions in the category script
Function | Description |
---|---|
assign | Assign a value to the innermost structured block definition of a variable. If the variable is not defined, the variable is defined in the innermost structured block. An error is thrown if not called from a list of values (statements) in a structured function. |
break | This is a special function that can be called to break out of the body of a loop. If called outside of a loop body, an error is thrown. |
const | Define one or more statically scoped constants local to the current script block with a permanent value. These constants can be accessed from the current block and inner blocks, but can not be assigned a different value. |
continue | This is a special function that can be called in the body of a loop function to test the condition and, if true, start evaluating the body again. If called outside of a loop body, an error is thrown. |
do_while | This creates a new structured block with a new nested variable scope. This function will evaluate a list of values (statements) at least once while a condition is true. See the related functions "break", "continue", "return" and "throw". |
for | This creates a new structured block with a new nested variable scope. This function loops while condition is true. If the condition is false for the first iteration, the loop returns a null value. |
foreach | This creates a new structured block with a new nested variable scope. This function will evaluate a list of values (statements) while a condition is true with initial and increment values. The condition is tested at the beginning of the loop. If the condition is false for the first iteration, the loop returns a null value. |
if | Evaluate one of two different values depending on test condition. |
let | Declare one or more statically scoped variable locations local to the current script block and optionally assign them an initial value. These variables can be accessed and assigned different values from the current block and inner blocks. |
rethrow | This is a special function that can be called to rethrow an error inside of a catch block. If called outside of a catch body, an error is thrown. |
return | Return from the outermost structured block. If the expression of a lambda function is a block function, this will effectively return from the lambda function. If called outside of a structured block, an error is thrown. |
script | Converts value to data type script returning script result. |
switch | Support for switch statement. |
throw | This throws an error that can be caught by a try/catch block. An error object of object type _AdaptiveError_ will be available in the catch block. Its "id" property will be set to "throw". The other properties set based on the parameters specified and where this function is called. |
try | This creates a new structured block with a new nested variable scope. This function will evaluate the body statements. If an error is thrown and there is an optional catch, the error will be "caught" and the associated statements will be evaluated. The optional finally statements are always evaluated after the body and catch statements. See the related functions "break", "continue", "return" and "throw". |
while | This creates a new structured block with a new nested variable scope. This function will evaluate a list of values (statements) while a condition is true. The condition is tested at the beginning of the loop. If the condition is false for the first iteration, the loop returns a null value. See the related functions "break", "continue", "return" and "throw". |