See Also: Memory Management Functions, MemSet
Allocates a block of memory.
Alloc( {iBytesAllocated} )
Where:
{iBytesAllocated} is the number of bytes requested
Alloc returns either a pointer to the allocated memory block, or zero (if the memory cannot be allocated). The memory is allocated on the process heap in DataFlex.
Pointer aInfo
Char cByteNeeded
Integer iRetVal
Move (Alloc (cByteNeeded)) to aInfo
Move (MemSet (aInfo, 0, cByteNeeded)) to iRetVal
Alloc does not initialize the memory block, you have to do that separately.