[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Predefined Pragma Variables
> Tim Teulings <tim@edge.ping.de>:
> >One more variable/pragma (f.e. COMPILER = "ooc"), that identifies ooc
> >itself. This would make it easier to compile code which is not only for
> >ooc but for other compilers (f.e. vthe various OberonSystem compilers).
> >One could f.e. choose different includes for different compilers.
>
> This is a good idea, and should be done, but almost moot for the moment
> because almost(?) all other Oberon compilers don't yet support any pragmas
> at all. Still, this might change.
Even if other compilers start to support pragmas it's unlikely that
they will use the same syntax and semantics as OOC. I'm in favour of
a variable COMPILER with a value of "OOC".
> Given that this might change, we should add a LANGUAGE pragma that would
> initially be defined as "Oberon-2" with OOC. Other compilers could define
> it as "Oberon" (no (or partial) O2 extensions, like Edipar), "Active Oberon"
> (Native S3), or "Component Pascal" (BlackBox). OOC could eventually support
> these as well, perhaps by setting LANGUAGE at the beginning or with modular
> compiler front ends.
On a much smaller scale OOC has something similar: the pragma variable
ConformantMode. When it is TRUE OOC will try to emulate ETH compilers
as far as possible, when it is FALSE OOC tries to stay closer to the
language report (for the most part).
Since I don't intend to turn OOC into a swiss army knife I will stick
to ConformantMode for the moment and won't add a LANGUAGE pragma.
-- mva