Navigation:  Reference > Functions >

AllocateArray()

Print this Topic Previous pageReturn to chapter overviewNext page

 

ALOCARY(1,2)

 

PURPOSE

You can use this function to allocate an array for a previously defined field.

 

PARTS

 

1 fn/vRequired - The field to allocate array elements for.

 

2 f/c/eRequired - The number of elements to allocate.  If there isn't enough available memory for the number of elements desired the program will allocate as many as possible.  The maximum number of array elements for any single field is 4,294,967,295.

 

RETURN TYPE - R

The actual number of elements allocated.

 

COMMENTS

The field (part 1) used in this command cannot be a part of a standard TAS Professional file.  It must have been created using the DEFINE command.

 

Once this function has been used to allocate the array the data space originally used by the field is lost to use.  Due to this you should define the field with no elements initially.  This keeps the amount of wasted space to a minimum.

 

define X type A size 1

define X_Elem type r

X_Size = ALOCARY(X, 100)

 

// if the memory is available X_Elem would now contain 100 and the

// The array elements of X would be 100

 

 

SEE ALSO

ALLOC, REMVA

 

 


Page url: http://www.cassoftware.com/tas/manual/allocatearray().htm