> I have the following code in a function: > > {$IFDEF LINUX}
Should be {$ifdef unix} > Slash := '/'; > {$ENDIF} > {$IFDEF WIN32} > Slash := '\'; > {$ENDIF} > > Obviously, FPC supports many other platforms. Is there a better way > to handle this? See other answers, but for the case it is not alraedy predefined, yet it works, also for crosscompile. However you should hardly ever use {$if(n)def linux}, _always_ unix. The only exeception are really 100% linux only things which are relatively rare. > there a way to detect this at run-time rather than compile time? Yes, but not OS independant. Each OS has its own api for such things :-) _______________________________________________ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal