Help Center
Help CenterFreeBASIC

#elseifndefkeyword

Preprocessor conditional directive

Preprocessorkeyworddocumented

Syntax

#ifdef A
' Conditionally included statements if A is defined
#elseifndef B
' Conditionally included statements if both A and B are not defined
#else
' Conditionally included statements if A is not defined and B is defined
#endif

Description


#elseifndef can be added to an #if block to provide an additional condition.

#elseifndef symbol is equivalent to #elseif Not defined(symbol)

Remarks

Version


  • Since fbc 1.20.0

Differences from QB


  • New to Freebasic

See also


Example


#ifdef A

    Print "A is defined"

#elseifndef B

    Print "both A and B are not defined"

#else

    Print "A is not defined and B is defined"

#endif


Reference

  • Documented in KeyPgPpelseifndef.html