Organization: FidoNet node 1:139/590 - PMI BBS, Green Bay WI
Lines: 34
m > So, let's put it this way: What does
m > ALLOCATE ( PointerVariable, SIZE( PointerVariable^ ) )
m > really perform? What do you achieve with an NEW(PointerVariable) call? m > Still assuming that PointerVariable points at some structured type such m > as RECORD.
Invokes a specific procedure to allocate a block of the specified size from the heap and return it for use in PointerVariable.
The NEW() operator provides some generalisation. It always needs a procedure called ALLOCATE() of the same formal type as Storage.ALLOCATE() but it doesn't impose any further restrictions. Your XStorage.ALLOCATE() procedure can do what it likes. It also reduces the chance of error in the stongly typed storage system, e.g: how many times have you typed:
ALLOCATE(PointerVariable, SIZE(PointerVariable));
So by using NEW() you have some flexibility in choosing your storage management, plus added safety. I typically use it in conjunction with debugging storage functions.
Best regards
Sean.
___
X PQ-Under-Trial 2.15 X CA Raisins murdered! Cereal Killer? Film at 11.