Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 7 Current »

Content Freeze

As of July 25th, 2023, there is a content freeze on this page.

The #elseif compiler directive is used to test a conditional expression within an #if or #elseif group.

If the previous #if or #elseif was not satisfied, and the conditional expression is true, then source lines following the #elseif directive are selected to be read. Otherwise, lines are excluded until the next #elseif, #else or #endif in the same #if group is encountered.

The syntax is as follows: 

#elseif defined(condition-name)

 or

#elseif not defined(condition-name)

  

Example:

#if defined(abc)
  // JavaScript logic
#elseif defined(xyz)
  // JavaScript logic
#else
  // JavaScript logic
#endif


RPG Equivalent

/ELSEIF


  • No labels