1. Re: Lua wrappers[still no answer]

don cole wrote:

> Why do you need to put include statements been If statments?
> 
> Why not just include everything whether needed or not?

This is not always possible when writing cross-platform programs. We can
not simply do this:

include code_for_dos.e
include code_for_win.e
include code_for_lnx.e

If for instance the file 'code_for_win.e' contains a line such as
   Shell32 = open_dll("shell32.dll") 

this will cause an error on DOS. Also Linux specific commands will
cause errors on Windows and vice versa.

So it would be useful, if we could to something like the following:

if platform() = DOS32 then
   include code_for_dos.e
elsif platform() = WIN32 then
   include code_for_win.e
elsif platform() = LINUX then
   include code_for_lnx.e
end if

Many people have asked for such a feature in the past.
Currently we can use a preprocessor, though.
Or use e.g. Vincent's dynamic include library for programs that will
be neither bound nor shrouded nor translated/compiled.

Regards,
   Juergen

-- 
What do you want to re-install today?

new topic     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu