Skip to content

#IFNDEF


Preprocessor conditional directive

Syntax

#ifndef symbol

' Conditionally included statements

#endif

Description

Conditionally includes statements at compile time.

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

#ifndef symbol is equivalent to #if Not defined(symbol)

Examples

start GeSHi

#IFNDEF __MYFILE_BI__
#DEFINE __MYFILE_BI__
    ' Declarations
#ENDIF

end GeSHi

Differences from QB

  • New to FreeBASIC

See also

  • #define
  • #macro
  • #if
  • #else
  • #elseif
  • #elseifdef
  • #elseifndef
  • #endif
  • #ifdef
  • #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