#ELSE
- Source: https://www.freebasic.net/wiki/wikka.php?wakka=KeyPgPpelse
- Last revised: 2023-10-02
Preprocessor conditional directive
Syntax
vb
#if (expression)
' Conditionally included statements if expression is True
#else
' Conditionally included statements if expression is False
#endifDescription
#else can be added to an #if, #ifdef, or #ifndef block to provide an alternate result to the conditional expression.
Examples
start GeSHi
vb
#DEFINE MODULE_VERSION 1
Dim a As String
#IF (MODULE_VERSION > 0)
a = "Release"
#ELSE
a = "Beta"
#ENDIF
Print "Program is "; aend GeSHi
Differences from QB
- New to FreeBASIC
See also
#define#macro#if#elseif#elseifdef#elseifndef#endif#ifdef#ifndef#undefdefined
Back to DocToc