{{fbdoc item="title" value="#ELSEIF"}}---- Preprocessor conditional directive {{fbdoc item="syntax"}}## [[KeyPgPpif|#if]] (expression1) ' Conditionally included statements if expression1 is True **#elseif** (expression2) ' Conditionally included statements if expression2 is True [[KeyPgPpelse|#else]] ' Conditionally included statements if both ' expression1 and expression2 are False [[KeyPgPpendif|#endif]] ## {{fbdoc item="desc"}} **#elseif** can be added to an ##[[KeyPgPpif|#if]]## block to provide an additional conditions. {{fbdoc item="ex"}} {{fbdoc item="filename" value="examples/manual/prepro/elseif.bas"}}%%(freebasic) #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 #ENDIF %% {{fbdoc item="diff"}} - New to Freebasic {{fbdoc item="see"}} - ##[[KeyPgPpdefine|#define]]## - ##[[KeyPgPpmacro|#macro]]## - ##[[KeyPgPpif|#if]]## - ##[[KeyPgPpelse|#else]]## - ##[[KeyPgPpelseifdef|#elseifdef]]## - ##[[KeyPgPpelseifndef|#elseifndef]]## - ##[[KeyPgPpendif|#endif]]## - ##[[KeyPgPpifdef|#ifdef]]## - ##[[KeyPgPpifndef|#ifndef]]## - ##[[KeyPgPpundef|#undef]]## - ##[[KeyPgDefined|defined]]## {{fbdoc item="back" value="CatPgPreProcess|Preprocessor"}}