Harbour Reference Guide

 

ARRAY()

Create an uninitialized array of specified length

Syntax

ARRAY( <nElements> [, <nElements>...] ) --> aArray

Arguments

<nElements> is the number of elements in the specified dimension.

Returns

<aArray> an array of specified dimensions.

Description

This function returns an uninitialized array with the length of <nElements>. Nested arrays are uninitialized within the same array pointer reference if additional parameters are specified. Establishing a memory variable with the same name as the array may destroy the original array and release the entire contents of the array. This depends, of course, on the data storage type of either the array or the variable with the same name as the array.
Examples
      FUNCTION Main()
        LOCAL aArray:=Array(10)
        LOCAL x:=1
        FOR x:=1 to LEN(aArray)
          aArray[x]:=Array(x)
        NEXT
        Return Nil
Status

Ready

Compliance

This function is CA-CLIPPER Compliant in all Cases, except that arrays in Harbour can have an unlimited number of dimensions, while Clipper has a limit of 4096 array elements.

Files

Library is vm

See Also

 




[Source Forge]

Other Docs Categories

Advantage Database RDD
Array
Binary conversion
Classes
Code Block
Console input
Conversion
Conversion Tools
DOS
Data input and output
Database
Database Tools
Date
Dos Tools
Environment
Error recovery
Events
File management
GT
Harbour Tools
Internal
Low Level
Math
Misc
Miscellaneous
Nation
Object manipulation
Operating System Specific
Parameter Checks
String Tools
Strings
TBrowse Method
TBrowse class
Terminal
Time
Utility
Variable Management

 

Last updated on 2001/07/30