#ELSEIFNDEF
- Source: https://www.freebasic.net/wiki/wikka.php?wakka=KeyPgPpelseifndef
- Last revised: 2023-10-02
Preprocessor conditional directive
Syntax
vb
#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
#endifDescription
#elseifndef can be added to an #if block to provide an additional condition.
#elseifndef symbol is equivalent to #elseif Not defined(symbol)
Examples
start GeSHi
vb
#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"
#ENDIFend GeSHi
Version
- Since fbc 1.20.0
Differences from QB
- New to Freebasic
See also
#define#macro#if#else#elseif#elseifdef#endif#ifdef#ifndef#undefdefined
Back to DocToc