Adam Naumowicz wrote:
Thanks. I read the http://agnes.dida.physik.uni-essen.de/~gnu-pascal/gpc_37.html#SEC37 as the Chief suggested me to do, and now I can see what is the reason of such behaviour. But still I would like to allocate only a part of the array (to simulate a dynamic array - the piece of code I'm working with is from an old non-OOP Pascal version). I also cannot pass size to standard NEW call (at least in BP) ...
You can use a GPC extension of {$define}. Put at the beginning of your source file these lines; {$ifdef __GPC__} {$define Getmem(x,y) New(x,y)} {$endif}
Then you can use 'Getmem' as usual, and GPC will substitute 'New' for it. Note that this is not visible outside the source file in which it was declared, so if you want to do the same in another file, you have to add those lines to that other file as well.
Best regards, The Chief --------- Prof. Abimbola Olowofoyeku (The African Chief) Author of Chief's Installer Pro for Win32 Email: African_Chief@bigfoot.com http://www.bigfoot.com/~african_chief/