Products Downloads


French version


 

 

ADELIA

      

      

      

      

(I/B)

 

 

 

 

 

Warning: In the case of ADELIA programs, this instruction is not compatible with the Adelia iSeries Studio C generator or with Adelia/400.

 

Section for use

All

 

Syntax

REALLOCATE Length PointerVarId

 

Length

Þ

Integer numeric constant or integer-numeric variable

PointerVarId

Þ

Pointer-type variable.

This type is mainly used to create an interface with APIs not developped with Adelia.

 

Description

Allows heap storage to be reallocated.

The REALLOCATE operation changes the length of the heap storage pointed to by PointerVarId. New storage is allocated and initialised to the value of the old storage.

The data is truncated if the new size is smaller than the old size.

If the new size is greater than the old size, the storage following the copied data is uninitialized.

The old storage is released; the PointerVarId variable is set to point to the new storage.

 

It is also possible to ALLOCATE and DEALLOCATE heap storage.

 

Example

Assume WW_Point is pointer variable

REALLOCATE 32 WW_Point

 

See also the list of 4GL instructions by topic

↑ Top of page


  • Aucune étiquette