[fpc-pascal] variable declarations with 'absolute' syntax

Marco van de Voort marcov at stack.nl
Tue Oct 13 16:20:32 CEST 2015

In our previous episode, Graeme Geldenhuys said:
> Looking at the FPC Language Reference for Variable Declaration syntax:
>   http://www.freepascal.org/docs-html/ref/refse21.html
> Specifically, ABSOLUTE declarations. The documentation gives this example:
> var
>   curterm1 : integer;
>   curterm6 : integer absolute curterm1;
> Now according to the syntax diagram the syntax after ABSOLUTE can be an
> Identifier or an Integer Expression. So the above is an example where an
> Identifier is used. So what is (code example) of valid syntax when the
> Integer Expression syntax is used?

IIRC on Dos you can use addresses in [segment:offset] notation.

More information about the fpc-pascal mailing list