Timo, could you provide some examples (= working env variables) for using this procedures under Windows and Linux. Would make it even more valuable, e.g. for the CodeArchive ...
freak wrote:
CompilerElse ; On Linux, use the environ array
Shouldn`t there be a check to see if it`s running on linux ?
I doubt the Amiga and (hopefully very soon) Mac versions would like running into x86 asm..
Great tip though.. can`t wait to get stuck into crashing Linux
tinman wrote:
This is when a "CompilerError" directive would be useful so you could stick in something saying "this code ain't supported on your scummy OS"
CompilerSelect #PB_Compiler_OS
CompilerCase #PB_OS_Windows
; some Windows specific code
CompilerCase #PB_OS_Linux
; some Linux specific code
CompilerDefault
;OS not supported
CompilerEndSelect
Paul wrote:Why can't you use CompilerSelect for this??
Well I would, but that doesn't change the fact there's no CompilerError directive which when used could inform the developer that they are using routines not supported by the OS. Much better than randomly compiling in no code which might affect parts of the program later.
If they still want to use them it would be easy enough to stick a semi-colon in front of them.
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)