This section contains brief descriptions of the functions that can be used with all data types.
Function | What it does |
---|---|
convert | Converts an expression from one supported data type to another. |
if | In a series of expressions, executes the second or third expression depending upon whether the first expression evaluates to true or false. |
max | Returns the largest value from a list of expressions of any supported data type. |
min | Returns the smallest value from a list of expressions of any supported data type. |
sizeof | Returns the size of an array. |
This function uses three expressions as input. If the first expression evaluates to true, the second expression is evaluated and used as the result (the third expression is not evaluated). If the first expression evaluates to false, then the third expression is evaluated and used as the result (the second expression is not evaluated). The first expression must be type Boolean; the second and third expressions must be the same type.
if (bool_expr, expr2, expr3)
where:Parameter | Description |
---|---|
bool_expr | An expression of type Boolean. |
expr2 | An expression of any supported data type. |
expr3 | An expression of the same data type as expr2. |
max (expr {, expr }0+)
where
expr is an expression of any supported data type. For example, if
x = 8, y = 13, and z = 28, the following expression returns the value
53.max (x +2, y, z, 53, 1, 17.4)
min (expr {, expr }0+)
where
expr is an expression of any supported data type. For example, if
x = 8, y = 13, and z = 28, the following expression returns the value
1.min (x +2, y, z, 2*z, 53, 1, 17.4)
This function computes the size of an array, returning the highest subscript used for an element of the given array. For example, if you specify entries for locations 5, 7, 8, 15, and 25 in an array, sizeof returns the number 25, even though only 5 locations in the array have non-defaulted entries. (Normally, you fill array locations in order.)
sizeof (array_id)
where array_id is the
name of the array.