Array.Create |
Top Previous Next |
Creates an array value for the given values.
Syntax function Array.Create(val1: variant; [, val2, valn: variant]): array
Alternative Names
Description Create an array value for the given values. At least 1 value is required, additional values can be listed after the first value. The values can be of mixed types.
val1 holds a value.
val2, valn holds additional values, multiple values can be listed when calling this routine.
The Return Value is the new array.
Example execute UDSBlock returns (length_value integer, single_array_value varchar(100)) as begin array_value = Array.Create('zero', 'one', 'two'); single_array_value = array_value[0]; length_value = Array.Length(array_value); suspend; /* returns 3 and 'zero' */
/* automatically extends array with another 2 items */ array_value[4] = 'four'; single_array_value = array_value[3]; length_value = Array.Length(array_value); suspend; /* returns 5 and NULL */ end |