Skip to content

#IFDEF


Preprocessor conditional directive

Syntax

#ifdef symbol

' Conditionally included statements

#endif

Description

Conditionally includes statements at compile time.

Statements within the #ifdef...#endif block are included if symbol is defined and excluded (ignored) if symbol is not defined.

#ifdef symbol is equivalent to #if defined (symbol)

Examples

start GeSHi

vb
#DEFINE _DEBUG
#IFDEF _DEBUG
    ' Special statements for debugging
#ENDIF

end GeSHi

Differences from QB

  • New to Freebasic

See also

  • #define
  • #macro
  • #if
  • #else
  • #elseif
  • #elseifdef
  • #elseifndef
  • #endif
  • #ifndef
  • #undef
  • defined

Back to DocToc

Translated from FreeBASIC official docs. Contact us for removal if infringed.
FreeBASIC is an open-source project, not affiliated with Microsoft