Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - else default label for simple conditional branch http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 else                Default label for simple conditional branch
------------------------------------------------------------------------------
 Syntax
   if <condition> ]
      [ <code> ]
   [ else ]
      [ <code> ]
   endif

 Arguments
   None.

 Description
   The else statement provides a label for the code which is executed
   when the logical expression supplied to the corresponding if statement     "
   evaluates to false.

 Example
   #define EXAMPLE_STATEMEN
   #include example.hdr

   #define LIMIT 10
   
   proc Test_else
   vardef
      uint nNumber
   enddef
   nNumber := LIMIT
   if nNumber > LIMIT
      ? "Number is greater than "
   else
      ? "Number is less than or equal to "
   endif
   ?? istr( LIMIT )
   endproc

   proc main
   Test_else()
   endproc

See Also: endif if

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson