|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
[Pascal] Detect OS
I was wondering if in Pascal (FreePascal 2) it would at all be posible to detect the operating system the code is currently being run on. C/C++ uses something along the lines of
Code:
#ifndef _WIN32 for detecting whether or not a Windows OS is being used. Does Pascal have the same feature? Edit: My problem has been solved. Last edited by †Yegg† : December 6th, 2005 at 05:02 PM. |
|
#2
|
||||
|
||||
|
So tell us what it is. Delphi supports $ifdef, what does FreePascal use?
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by Keath and KevinADC, superior perl programmers of the month |
|
#3
|
||||
|
||||
|
FreePascal uses the exact same thing. I found that out almost right after I made this post. You would do
Code:
{$ifdef condition}
You use Code:
{$endif}
for ending the conditional statement(s). You can also use {$else} and {$elseif}. Along with other types of statements that the FreePascal documentation explains in more detail about. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Delphi Programming > [Pascal] Detect OS |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|