[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Declaration
----------------------------------------------------------------------------
An array is declared with the internal function array().
Syntax:
<array name> = array(<type>,<cnt>)
<array name> is the name of the array being declared.
<cnt> is the number of elements that in the array. This parameter
must have an integer value and can be a constant, a variable or
the result of an expression. The maximum number of elements in an
array is 8192.
<type> is a string value and can be a quoted string, a variable
or string expression. It indicates the type of the array being
declared and can be one of the following:
'BOX' - an array of Box Objects
'C' - an array of Strings
'CODE' - an array of Code Blocks
'DBF' - an array of DBF Objects
'DICDBF' - an array of dicDBF Objects
'DICFIELD' - an array of dicField Object
'FIELD' - an array of Field Objects
'INDEX' - an array of Index Objects
'L' - an array of Logicals
'MEMVAR' - an array of Memvar Objects
'N' - an array of Integers
'OPTION' - an array of Option Objects
'RELATION' - an array of Relation Objects
'VAR' - an array of Variable Objects
The following example declares x to be an array with ten elements
of type integer.
x = array('N',10)
When an array is declared and assigned to an existing array, the
contents of the existing array are lost. In other words, if a
call to array() is used to make an existing array larger, the
stored data is lost, even if the type of the array doesn't
change.
x = array('N',5) ** set up the array
x[1] = 5
x = array('N',10) ** all old data destroyed
Reference to Operators is in Quick Reference Section.
See Also:
Operators
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson