[fpc-devel] An extension of fpc language: the BASED construct
giuliano.colla at fastwebnet.it
Fri Dec 29 19:17:45 CET 2017
Il 27/12/2017 15:05, Sven Barth via fpc-devel ha scritto:
> No matter the syntax that might be chosen for this it will likely be
> sufficient to handle that feature by an absolutevarsym with a boolean
> flag or something like that. The difference to an ordinary absolute
> variable appears to be too small to warrant a new sym type.
After struggling sometime to find out the best way to implement the
based feature without adding a new keyword, I found that the syntax:
aVar: anyType ABSOLUTE somePTR^;
can be implemented with minimal changes.
Attached the patch which does the trick, and which works like the old
It doesn't support *implicit* dereferencing, because I've left untouched
the code which filters it out.
One could remove the filtering for consistency, but I don't like very
much the idea: the aim of such a feature is to provide a more readable
and understandable code, not the opposite.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3190 bytes
Desc: not available
More information about the fpc-devel