Compiler commands
#2
https://qb64phoenix.com/qb64wiki/index.php/$IF

A fake variable could be defined with $LET:

Code: (Select All)
$LET SOMETHN=5
$IF DEFINED SOMETHN THEN
' do this
$ELSE
' complain about "somethn"
$END IF

Note that you cannot leave out the "$LET", especially the dollar sign if you expect a compiler directive.

Otherwise could check for the OS the program is being compiled on:

Code: (Select All)
$IF WIN THEN
' do your Windows routines with confidence here
$ELSEIF LINUX THEN
' Linux-only stuff here
$ELSE
' assume it's for MacOS then
$END IF
Reply


Messages In This Thread
Compiler commands - by eoredson - 02-21-2023, 06:16 AM
RE: Compiler commands - by mnrvovrfc - 02-21-2023, 07:48 AM
RE: Compiler commands - by RhoSigma - 02-21-2023, 12:04 PM
RE: Compiler commands - by eoredson - 02-21-2023, 11:28 PM



Users browsing this thread: 1 Guest(s)