Skip to main content

#else   #elif    #endif

Syntax


#if expression

#else

#endif

     or

#if (defined name)

#elif  expression

#endif

     or

#if (defined name)

#endif

Description


These statements complete or extend #if statements. 

These statements may nest. And unlimited #elif are allowed.

Example

\

#if someNAME == 3

#elif someNAME == 4

#elif
(defined COMPILETHIS) || (defined COMPILETHAT)

#else

#endif

Differences from other BASICs

\

  • only #else available in PBASIC
  • no equivalent in Visual BASIC, but may be done with C-pre-processor

See also

\