Re: An illuminating experiment using platform().

new topic     » goto parent     » topic index » view thread      » older message » newer message
CChris said...
Jeremy Cowgar said...

So, why use platform()? I have no clue.

For cross compilation purposes.

I'm on a Windows platflrom, and wish to output code that might run under Unix. An ifdef WIN32 statement will indeed cut off any Unix specific code, and the code won't ever show up in generated IL.

I do not fully understand what you are saying here. Are you saying that the cross-translation sets up the wrong PLATFORM ? If so, that's a bug that needs to be fixed.

CChris said...

platform() is obviously less versatile than ifdef. But it is the only currently known way to defer cutting code off whie having parsed it already, and still distribute only one file. Cross-translating is fine, but then you must distribute as ùmany executables as psupported platforms.

Why would you want that? Also, if you are not cross-translating, then what are you doing? ifdef works just fine in interpreted applications as well. There is no need what-so-ever to translate to make ifdef work.

CChris said...

] If we had a deferred_ifdef, then platform() could be deprecated.

What exactly would deferred_ifdef do that cannot be done with ifdef?

Jeremy

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu