Data type Array Foundation

A value of the data type "array" is a group of values which can have the same or different data types. Using an array, several values can be assigned to a single variable. A single value of an array is identified as an array element. Literal arrays are written within a program as a comma separated list of values enclosed in curly braces {}. The following code shows examples for literal arrays:

{ 1, 2, 3, 4, 5 }                      // same data type 
{ 10, "Characters", CtoD("06.12.94") } // different data types 
{ {"A", "B"}, { 1, 2 }, NIL, .T. }     // arrays within the array 

An array element can contain another array. This allows multidimensional arrays to be used in Xbase++. Neither the number of elements in an array nor the number of array dimensions are limited. An empty array with no elements is identified using two curly braces {} without any specified values.

Values of the array data type cannot be stored in DBF files. However, they can be saved in XPF files provided for handling memory variables.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.