#ELSEIF
- Source: https://www.freebasic.net/wiki/wikka.php?wakka=KeyPgPpelseif
- Last revised: 2023-10-02
Preprocessor conditional directive
Syntax
vb
#if (expression1)
' Conditionally included statements if expression1 is True
#elseif (expression2)
' Conditionally included statements if expression2 is True
#else
' Conditionally included statements if both
' expression1 and expression2 are False
#endifDescription
#elseif can be added to an #if block to provide an additional conditions.
Examples
start GeSHi
vb
#DEFINE WORDSIZE 16
#IF (WORDSIZE = 16)
' Do some some 16 bit stuff
#ELSEIF (WORDSIZE = 32)
' Do some some 32 bit stuff
#ELSE
#ERROR WORDSIZE must be set To 16 Or 32
#ENDIFend GeSHi
Differences from QB
- New to Freebasic
See also
#define#macro#if#else#elseifdef#elseifndef#endif#ifdef#ifndef#undefdefined
Back to DocToc