1. Re: Compiler ?? (dynamic inclusion)
On Tue, 06 Jun 2000, you wrote:
> Hrm.. well, let me explain just why I'd like conditional compilation (and
> conditional interpretation).
>
> Suppose you've written a library (or a program) that you want to be
> compilable on any platform. The problem is that this library uses
> OS-specific stuff. What to do? Write one version for each OS? Nah, do it
> like this instead:
>
> -- Suppose this is the Windows version
> define WIN32
>
> ifdef DOS32
> -- DOS specific stuff goes here
> endif
> ifdef WIN32
> -- Windows
> endif
> ifdef LINUX
> -- ..and finally Linux
> endif
Now I agree with you - we already have platform() which defines
Linux/Win/Dos, so we can write platform dependent code.
if platform() = LINUX then
x = 4 ... etc.
elsif platform() = DOS then ...
However, what we really need is conditional _includes_, for example,
if platform() = LINUX then include xgraphics.e
elsif platform() = DOS then include graphics.e ....
I don't know why this would be hard to add to Euphoria.
Irv