Adaptive Framework  0.9.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Functions | Variables

Adaptive Function union<rfc822Name> More...

Functions

const afw_value_tafw_function_execute_assign (afw_function_execute_t *x)
 Adaptive Function assign More...
 
const afw_value_tafw_function_execute_break (afw_function_execute_t *x)
 Adaptive Function break More...
 
const afw_value_tafw_function_execute_compile_script (afw_function_execute_t *x)
 Adaptive Function compile<script> More...
 
const afw_value_tafw_function_execute_const (afw_function_execute_t *x)
 Adaptive Function const More...
 
const afw_value_tafw_function_execute_continue (afw_function_execute_t *x)
 Adaptive Function continue More...
 
const afw_value_tafw_function_execute_do_while (afw_function_execute_t *x)
 Adaptive Function do_while More...
 
const afw_value_tafw_function_execute_evaluate_script (afw_function_execute_t *x)
 Adaptive Function evaluate<script> More...
 
const afw_value_tafw_function_execute_for (afw_function_execute_t *x)
 Adaptive Function for More...
 
const afw_value_tafw_function_execute_foreach (afw_function_execute_t *x)
 Adaptive Function foreach More...
 
const afw_value_tafw_function_execute_if (afw_function_execute_t *x)
 Adaptive Function if More...
 
const afw_value_tafw_function_execute_loc (afw_function_execute_t *x)
 Adaptive Function loc More...
 
const afw_value_tafw_function_execute_return (afw_function_execute_t *x)
 Adaptive Function return More...
 
const afw_value_tafw_function_execute_while (afw_function_execute_t *x)
 Adaptive Function while More...
 

Variables

 afw_function_definition_assign
 Function definition assign.
 
 afw_function_definition_bag_script
 Function definition bag<script>
 
 afw_function_definition_bag_size_script
 Adaptive Function bag<script> More...
 
 afw_function_definition_break
 Adaptive Function bag_size<script> More...
 
 afw_function_definition_compile_script
 Function definition compile<script>
 
 afw_function_definition_const
 Function definition const.
 
 afw_function_definition_continue
 Function definition continue.
 
 afw_function_definition_do_while
 Function definition do_while.
 
 afw_function_definition_eq_script
 Function definition eq<script>
 
 afw_function_definition_eqx_script
 Adaptive Function eq<script> More...
 
 afw_function_definition_evaluate_script
 Adaptive Function eqx<script> More...
 
 afw_function_definition_for
 Function definition for.
 
 afw_function_definition_foreach
 Function definition foreach.
 
 afw_function_definition_ge_script
 Function definition ge<script>
 
 afw_function_definition_gt_script
 Adaptive Function ge<script> More...
 
 afw_function_definition_if
 Adaptive Function gt<script> More...
 
 afw_function_definition_is_script
 Function definition is<script>
 
 afw_function_definition_le_script
 Adaptive Function is<script> More...
 
 afw_function_definition_loc
 Adaptive Function le<script> More...
 
 afw_function_definition_lt_script
 Function definition lt<script>
 
 afw_function_definition_ne_script
 Adaptive Function lt<script> More...
 
 afw_function_definition_nex_script
 Adaptive Function ne<script> More...
 
 afw_function_definition_return
 Adaptive Function nex<script> More...
 
 afw_function_definition_script
 Function definition script.
 
 afw_function_definition_while
 Adaptive Function script More...
 

Detailed Description

Adaptive Function union<rfc822Name>

Parameters
xfunction 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:

function union<rfc822Name>(
lists_1: (list rfc822Name),
lists_2: (list rfc822Name),
...lists_rest: (list of (list rfc822Name))
): (list rfc822Name);

Parameters:

lists - (2 or more list rfc822Name) Two or more lists.

Returns:

(list rfc822Name)

Implemented by afw_function_execute_union()


script adaptive functions.

Function Documentation

◆ afw_function_execute_assign()

const afw_value_t* afw_function_execute_assign ( afw_function_execute_t x)

Adaptive Function assign

Parameters
xfunction 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:

function assign(
name: string,
value: any
): any;

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.

◆ afw_function_execute_break()

const afw_value_t* afw_function_execute_break ( afw_function_execute_t x)

Adaptive Function break

Parameters
xfunction 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:

function break(
value?: any
): any;

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.

◆ afw_function_execute_compile_script()

const afw_value_t* afw_function_execute_compile_script ( afw_function_execute_t x)

Adaptive Function compile<script>

Parameters
xfunction 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:

function compile<script>(
source: script,
listing?: any
): unevaluated;

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.

◆ afw_function_execute_const()

const afw_value_t* afw_function_execute_const ( afw_function_execute_t x)

Adaptive Function const

Parameters
xfunction 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:

function const(
name: (list string),
value: any,
type?: (object _AdaptiveValueMeta_)
): any;

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.

◆ afw_function_execute_continue()

const afw_value_t* afw_function_execute_continue ( afw_function_execute_t x)

Adaptive Function continue

Parameters
xfunction 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:

function continue(
): any;

Parameters:

Returns:

(any dataType) This function does not return.

Definition at line 246 of file afw_function_script.c.

◆ afw_function_execute_do_while()

const afw_value_t* afw_function_execute_do_while ( afw_function_execute_t x)

Adaptive Function do_while

Parameters
xfunction 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:

function do_while(
condition: boolean,
body: list
): any;

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.

◆ afw_function_execute_evaluate_script()

const afw_value_t* afw_function_execute_evaluate_script ( afw_function_execute_t x)

Adaptive Function evaluate<script>

Parameters
xfunction 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:

function evaluate<script>(
source: script,
additionalUntrustedQualifiedVariables?: (object _AdaptiveHybridPropertiesObjects_)
): unevaluated;

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.

◆ afw_function_execute_for()

const afw_value_t* afw_function_execute_for ( afw_function_execute_t x)

Adaptive Function for

Parameters
xfunction 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:

function for(
initial?: list,
condition?: boolean,
increment?: list,
body?: list
): any;

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.

◆ afw_function_execute_foreach()

const afw_value_t* afw_function_execute_foreach ( afw_function_execute_t x)

Adaptive Function foreach

Parameters
xfunction 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:

function foreach(
name: (list string),
value: any,
body?: list
): any;

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.

◆ afw_function_execute_if()

const afw_value_t* afw_function_execute_if ( afw_function_execute_t x)

Adaptive Function if

Parameters
xfunction 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:

function if(
condition: boolean,
then: list,
else?: list
): any;

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.

◆ afw_function_execute_loc()

const afw_value_t* afw_function_execute_loc ( afw_function_execute_t x)

Adaptive Function loc

Parameters
xfunction 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:

function loc(
name: (list string),
value?: any,
type?: (object _AdaptiveValueMeta_)
): any;

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.

◆ afw_function_execute_return()

const afw_value_t* afw_function_execute_return ( afw_function_execute_t x)

Adaptive Function return

Parameters
xfunction 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:

function return(
value?: any
): any;

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.

◆ afw_function_execute_while()

const afw_value_t* afw_function_execute_while ( afw_function_execute_t x)

Adaptive Function while

Parameters
xfunction 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:

function while(
condition: boolean,
body: list
): any;

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.

Variable Documentation

◆ afw_function_definition_bag_size_script

afw_function_definition_bag_size_script

Adaptive Function bag<script>

Parameters
xfunction 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:

function bag<script>(
...values: (list of (list script))
): (list script);

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

afw_function_definition_break

Adaptive Function bag_size<script>

Parameters
xfunction 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:

function bag_size<script>(
value: (list script)
): integer;

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

afw_function_definition_eqx_script

Adaptive Function eq<script>

Parameters
xfunction 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:

function eq<script>(
arg1: script,
arg2: any
): boolean;

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

afw_function_definition_evaluate_script

Adaptive Function eqx<script>

Parameters
xfunction 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:

function eqx<script>(
arg1: script,
arg2: any
): boolean;

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

afw_function_definition_gt_script

Adaptive Function ge<script>

Parameters
xfunction 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:

function ge<script>(
arg1: script,
arg2: script
): boolean;

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

afw_function_definition_if

Adaptive Function gt<script>

Parameters
xfunction 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:

function gt<script>(
arg1: script,
arg2: script
): boolean;

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

afw_function_definition_le_script

Adaptive Function is<script>

Parameters
xfunction 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:

function is<script>(
value: any
): boolean;

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

afw_function_definition_loc

Adaptive Function le<script>

Parameters
xfunction 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:

function le<script>(
arg1: script,
arg2: any
): boolean;

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

afw_function_definition_ne_script

Adaptive Function lt<script>

Parameters
xfunction 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:

function lt<script>(
arg1: script,
arg2: script
): boolean;

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

afw_function_definition_nex_script

Adaptive Function ne<script>

Parameters
xfunction 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:

function ne<script>(
arg1: script,
arg2: any
): boolean;

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

afw_function_definition_return

Adaptive Function nex<script>

Parameters
xfunction 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:

function nex<script>(
arg1: script,
arg2: any
): boolean;

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

afw_function_definition_while

Adaptive Function script

Parameters
xfunction 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:

function script(
value: any
): script;

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.