[fpc-devel] *** GMX Spamverdacht *** An extension of fpc language: the BASED construct

Giuliano Colla giuliano.colla at fastwebnet.it
Wed Dec 27 00:09:36 CET 2017

Il 26/12/2017 18:43, Karoly Balogh (Charlie/SGR) ha scritto:
> HI,
> On Tue, 26 Dec 2017, Thorsten Engler wrote:
>>>   Item: BYTE BASED ItemPtr;
>> Ignoring any other considerations for now, I would have at least used a
>> logical extension derived from already supported syntax:
>> Item: Byte absolute ItemPtr^;
> As far as I understand (I did not try) this was once supported, but
> explicitly removed by FPC 2.4.0 from Absolute keyword dereferencing is no
> longer allowed:
> http://wiki.freepascal.org/User_Changes_2.4.0#Absolute_variable_declarations
> As the reasoning there shows, it's a very slippery slope this, which could
> open a can of worms, so careful people. :)

I'd not be in favour of using the same syntax for two quite different 
Although the practice implementation is similar, the semantics is 
completely different:

ABSOLUTE declares a variable whose storage is known and assigned at 
compile time.

BASED declares a variable whose storage is unknown, and will only be 
instantiated at run time.

Mixing the two things may cause a lot of troubles, and most likely 
that's the reason why it was removed from fpc 2.4.0.


More information about the fpc-devel mailing list