Click or drag to resize

ArrayBuild Function

X#
Create an empty array.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax
 FUNCTION ArrayBuild() AS ARRAY
Request Example View Source

Return Value

Type: Array
Remarks
ArrayBuild() creates an empty array.
It is the functional form of an empty array assignment like this:
X#
1aMyArray := {}
Note, however, that within the generic {} you are allowed to list other values while ArrayBuild() does not take any arguments. To create uninitialized arrays of specified length, see ArrayCreate() and ArrayNew().
To create initialized arrays, see ArrayInit().
Examples
This example creates an empty array using the ArrayBuild() function, then shows the equivalent action by assigning a literal array:
X#
1aArray := ArrayBuild()
2aArray := {}
See Also