Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...


Note
titleContent Freeze

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

The #else compiler directive is used to unconditionally select source lines to be read following a failed #if or #elseif test.

If the previous #if or #elseif was not satisfied, source lines are selected until the next #endif.

If the previous #if or #elseif was satisfied, source lines are excluded until the next #endif.


Example:

Code Block
languagejavascript
// This include should be included twice with #include
// The first include brings in all the relevant declarations
// The second include brings in the executable code
 
#if not defined(declared)
  // declarations go here
#define declared
#else
  // executable code goes here
#endif

...


RPG Equivalent

/ELSE