Adaptive Framework
0.9.0
|
Adaptive Function union<rfc822Name>
More...
Adaptive Function union<rfc822Name>
x | function execute parameter. |
Returns a list of rfc822Name contains all of the unique values in two or more list of rfc822Name values.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
lists - (2 or more list rfc822Name) Two or more lists.
Returns:
(list rfc822Name)
Implemented by afw_function_execute_union()
script adaptive functions.
const afw_value_t* afw_function_execute_assign | ( | afw_function_execute_t * | x | ) |
Adaptive Function assign
x | function execute parameter. |
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 in a structured function.
This function is not pure, so it may return a different result given exactly the same parameters and has side effects.
Declaration:
Parameters:
name - (string) Variable name.
value - (any dataType) This is the value to assign to the variable.
Returns:
(any dataType) The value assigned.
Definition at line 53 of file afw_function_script.c.
const afw_value_t* afw_function_execute_break | ( | afw_function_execute_t * | x | ) |
Adaptive Function break
x | function execute parameter. |
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.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
value - (optional any dataType) The value to evaluate that the enclosing loop will return. If not specified, the last evaluated value or a null value will be returned.
Returns:
(any dataType) This function returns from the body of a loop with the last evaluated value.
Definition at line 95 of file afw_function_script.c.
const afw_value_t* afw_function_execute_compile_script | ( | afw_function_execute_t * | x | ) |
Adaptive Function compile<script>
x | function execute parameter. |
Compile script value and return either an unevaluated adaptive value or a string containing the compiler listing.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
source - (script) script string to compile.
listing - (optional any dataType) If specified, a compiler listing is produced instead of an unevaluated expression value.
This parameter can be an integer between 0 and 10 of a string that is used for indentation. If 0 is specified, no whitespace is added to the resulting string. If 1 through 10 is specified, that number of spaces is used.
Returns:
(unevaluated)
Definition at line 143 of file afw_function_script.c.
const afw_value_t* afw_function_execute_const | ( | afw_function_execute_t * | x | ) |
Adaptive Function const
x | function execute parameter. |
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.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
name - (list string) The name of one or more constants to defined in the current block.
value - (any dataType) This is the value of the constant(s).
type - (optional object AdaptiveValueMeta) The type of the constant(s).
Returns:
(any dataType) The value assigned.
Definition at line 208 of file afw_function_script.c.
const afw_value_t* afw_function_execute_continue | ( | afw_function_execute_t * | x | ) |
Adaptive Function continue
x | function execute parameter. |
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.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
Returns:
(any dataType) This function does not return.
Definition at line 246 of file afw_function_script.c.
const afw_value_t* afw_function_execute_do_while | ( | afw_function_execute_t * | x | ) |
Adaptive Function do_while
x | function execute parameter. |
This creates a new structured block with a new nested variable scope.
This function will evaluate a list of values at least once while a condition is true. See the related functions "break", "continue", and "return".
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
condition - (boolean) While this condition is true, the loop will continue. This is evaluated in the loop's scope.
body - (list) This is a list of values that are evaluated for each iteration of the loop. Each value in body is evaluated in order until the end of the list or until a "break", "continue" or "return" function is encountered.
Returns:
(any dataType) The last value evaluated in body or null if the body is empty.
Definition at line 295 of file afw_function_script.c.
const afw_value_t* afw_function_execute_evaluate_script | ( | afw_function_execute_t * | x | ) |
Adaptive Function evaluate<script>
x | function execute parameter. |
Compile and evaluate script value.
This function is not pure, so it may return a different result given exactly the same parameters.
Declaration:
Parameters:
source - (script) script string to compile and evaluate.
additionalUntrustedQualifiedVariables - (optional object AdaptiveHybridPropertiesObjects) This parameter supplies additional qualified variables that can be accessed during evaluation. These variables will not be used by anything that needs to ensure its qualified variables must come from a trusted source, such as authorization. This parameter is intended to be used for testing only and should not be used for anything running in production.
Returns:
(unevaluated)
Definition at line 348 of file afw_function_script.c.
const afw_value_t* afw_function_execute_for | ( | afw_function_execute_t * | x | ) |
Adaptive Function for
x | function execute parameter. |
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.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
initial - (optional list) This is a list of values to evaluate before the loop starts. The values will normally be a call to the "assign" function.
condition - (optional boolean) While this condition is true, the loop will continue.
increment - (optional list) This is a list of values to evaluate after each iteration of the loop. The values will normally be a call to the "assign" function.
body - (optional list) This is a list of values that are evaluated for each iteration of the loop. Each value in body is evaluated in order until the end of the list or until a "break", "continue" or "return" function is encountered.
Returns:
(any dataType) The last value evaluated in body or null if condition evaluates to false the first time.
Definition at line 425 of file afw_function_script.c.
const afw_value_t* afw_function_execute_foreach | ( | afw_function_execute_t * | x | ) |
Adaptive Function foreach
x | function execute parameter. |
This creates a new structured block with a new nested variable scope.
This function will evaluate a list of values 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.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
name - (list string) Variable name(s).
value - (any dataType) Any list, object or single value.
body - (optional list) This is a list of values that are evaluated for each iteration of the loop. Each value in body is evaluated in order until the end of the list or until a "break", "continue" or "return" function is encountered.
Returns:
(any dataType) The last value evaluated in body or null if condition evaluates to false the first time.
Definition at line 484 of file afw_function_script.c.
const afw_value_t* afw_function_execute_if | ( | afw_function_execute_t * | x | ) |
Adaptive Function if
x | function execute parameter. |
Evaluate one of two different values depending on test condition.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
condition - (boolean) If true, parameter "then" is evaluated for result. If false, parameter "else" is evaluated.
then - (list) This is the body of a structured block that is evaluated if "condition" is true. See the "body" parameter of the "block" function for information on how the body is processed.
else - (optional list) This is the body of a structured block that is evaluated if "condition" is false. If not specified and condition is false, a null value is returned. See the "body" parameter of the "block" function for information on how the body is processed.
Returns:
(any dataType) The result of evaluating "then" or "else".
Definition at line 540 of file afw_function_script.c.
const afw_value_t* afw_function_execute_loc | ( | afw_function_execute_t * | x | ) |
Adaptive Function loc
x | function execute parameter. |
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.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
name - (list string) The name of one or more variables to declared in the current block.
value - (optional any dataType) This is the initial value of the variable(s). If not specified, the variable will have a value of undefined.
type - (optional object AdaptiveValueMeta) The type of the variable(s).
Returns:
(any dataType) The value assigned.
Definition at line 596 of file afw_function_script.c.
const afw_value_t* afw_function_execute_return | ( | afw_function_execute_t * | x | ) |
Adaptive Function return
x | function execute parameter. |
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.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
value - (optional any dataType) The value to evaluate that the outermost block will return. If not specified, the last evaluated value or a null value will be returned.
Returns:
(any dataType) This function returns from the outermost structured block with the last evaluated value.
Definition at line 639 of file afw_function_script.c.
const afw_value_t* afw_function_execute_while | ( | afw_function_execute_t * | x | ) |
Adaptive Function while
x | function execute parameter. |
This creates a new structured block with a new nested variable scope.
This function will evaluate a list of values 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", and "return".
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
condition - (boolean) While this condition is true, the loop will continue. This is evaluated in the loop's scope.
body - (list) This is a list of values that are evaluated for each iteration of the loop. Each value in body is evaluated in order until the end of the list or until a "break", "continue" or "return" function is encountered.
Returns:
(any dataType) The last value evaluated in body or null if condition evaluates to false the first time.
Definition at line 690 of file afw_function_script.c.
afw_function_definition_bag_size_script |
Adaptive Function bag<script>
x | function execute parameter. |
Takes any number of script values and returns a list of list.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
values - (0 or more list script)
Returns:
(list script)
Implemented by afw_function_execute_bag()
Function definition bag_size<script>
Definition at line 25208 of file afw_function_bindings.h.
afw_function_definition_break |
Adaptive Function bag_size<script>
x | function execute parameter. |
This returns the integer number of values in list.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
value - (list script)
Returns:
(integer)
Implemented by afw_function_execute_bag_size()
Function definition break
Definition at line 25242 of file afw_function_bindings.h.
afw_function_definition_eqx_script |
Adaptive Function eq<script>
x | function execute parameter. |
Determine if script arg1 is equal to the value of arg2 converted to the data type of arg1 then return the boolean result. Use "eqx" ("===") instead if you want false to be returned if arg1 and arg2's data type don't match.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
arg1 - (script)
arg2 - (any dataType)
Returns:
(boolean)
Errors thrown:
conversion - arg2 cannot be converted to the data type of arg1.
Implemented by afw_function_execute_eq()
Function definition eqx<script>
Definition at line 25484 of file afw_function_bindings.h.
afw_function_definition_evaluate_script |
Adaptive Function eqx<script>
x | function execute parameter. |
Determine if for script arg1 is equal to the value and data type of arg2 then return the boolean result. Use "eq" ("==") instead if you want arg2 to be converted to the data type of arg1 before comparison.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
arg1 - (script)
arg2 - (any dataType)
Returns:
(boolean)
Implemented by afw_function_execute_eqx()
Function definition evaluate<script>
Definition at line 25523 of file afw_function_bindings.h.
afw_function_definition_gt_script |
Adaptive Function ge<script>
x | function execute parameter. |
Checks for script arg1 is greater than or equal to script arg2 and return the boolean result.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
arg1 - (script)
arg2 - (script)
Returns:
(boolean)
Implemented by afw_function_execute_ge()
Function definition gt<script>
Definition at line 25705 of file afw_function_bindings.h.
afw_function_definition_if |
Adaptive Function gt<script>
x | function execute parameter. |
Checks for script arg1 is greater than script arg2 and return the boolean result.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
arg1 - (script)
arg2 - (script)
Returns:
(boolean)
Implemented by afw_function_execute_gt()
Function definition if
Definition at line 25743 of file afw_function_bindings.h.
afw_function_definition_le_script |
Adaptive Function is<script>
x | function execute parameter. |
Checks whether value is dataType script and return the boolean result.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
value - (any dataType) Value to check.
Returns:
(boolean)
Implemented by afw_function_execute_is()
Function definition le<script>
Definition at line 25822 of file afw_function_bindings.h.
afw_function_definition_loc |
Adaptive Function le<script>
x | function execute parameter. |
Checks for script arg1 is less than or equal to script arg2 and return the boolean result.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
arg1 - (script)
arg2 - (any dataType)
Returns:
(boolean)
Implemented by afw_function_execute_le()
Function definition loc
Definition at line 25860 of file afw_function_bindings.h.
afw_function_definition_ne_script |
Adaptive Function lt<script>
x | function execute parameter. |
Checks for script arg1 is less that script arg2 and return the boolean result.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
arg1 - (script)
arg2 - (script)
Returns:
(boolean)
Implemented by afw_function_execute_lt()
Function definition ne<script>
Definition at line 25943 of file afw_function_bindings.h.
afw_function_definition_nex_script |
Adaptive Function ne<script>
x | function execute parameter. |
Determine if script arg1 is not equal to the value of arg2 converted to the data type of arg1 then return the boolean result. Use "nex" ("!==") instead if you want true to be returned if arg1 and arg2's data type don't match.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
arg1 - (script)
arg2 - (any dataType)
Returns:
(boolean)
Errors thrown:
conversion - arg2 cannot be converted to the data type of arg1.
Implemented by afw_function_execute_ne()
Function definition nex<script>
Definition at line 25986 of file afw_function_bindings.h.
afw_function_definition_return |
Adaptive Function nex<script>
x | function execute parameter. |
Determine if for script arg1 is not equal to the value or data type of arg2 then return the boolean result. Use "ne" ("!=") instead if you want arg2 to be converted to the data type of arg1 before comparison.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
arg1 - (script)
arg2 - (any dataType)
Returns:
(boolean)
Implemented by afw_function_execute_nex()
Function definition return
Definition at line 26025 of file afw_function_bindings.h.
afw_function_definition_while |
Adaptive Function script
x | function execute parameter. |
Converts value to data type script returning script result.
This function is pure, so it will always return the same result given exactly the same parameters and has no side effects.
Declaration:
Parameters:
value - (any dataType) Value to convert.
Returns:
(script) Converted value.
Errors thrown:
cast_error - value could not be converted
Implemented by afw_function_execute_convert()
Function definition while
Definition at line 26101 of file afw_function_bindings.h.