Navigation:  Reference > Functions >

AllocateField()

Print this Topic Previous pageReturn to chapter overviewNext page

 

ALC_FLD(1,2)

 

PURPOSE

You can use this function to allocate a single previously defined field.  Generally this would be used if you don't know how large the field should be before the program is run.

 

PARTS

 

1 fn/vRequired - The field to allocate.  This must be a type A field.

 

2 f/c/eRequired - The new desired size.  Maximum size possible is 4gb.  If the amount of available memory is less than the size given the program will be allocated as much as possible.

 

RETURN TYPE - R

The actual size 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 field the data space originally used by the field is lost to use.  Due to this you should define the field with a size of 1 initially.  This keeps the amount of wasted space to a minimum.

 

EXAMPLE

define X type A size 1

define X_Size type r

X_Size = ALC_FLD(X, 5000)

 

// if the memory is available X_Size would now contain 5000 and the

// size of X would also be 5000

 

 


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