Re: [fpc-pascal] variant part of a record
ppkk at mail.ru
Wed Sep 20 14:41:03 CEST 2006
> That would be more easily doable than the above, though again it
> would break compatibility with other Pascal compilers afaik.
I thought so.
But FPC isn't very compatible as it is: if you don't care for compatibility much, Delphi won't compile a program. Of course, TP will fail too.
It may be active in ObjFPC mode only.
> Hacking the parser to support this directly is a waste of time imho
> (not to mention that it would break the code's compatibility with
> every other Pascal compiler out there afaik).
More specifically, it adds feature and does not break backward compatibility. Otherwise, the same as above. As you saw, nested records and properties already solve the problem, but with bulky and not very internal albeit transparent methods (pun).
In any way, it's you (one of those), who exert influence upon the FPC, not me.
More information about the fpc-pascal