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 - endif simple conditional branch end http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 endif               Simple conditional branch end
------------------------------------------------------------------------------
 Syntax
   if <condition> ]
      [ <code> ]
   [ else ]
      [ <code> ]
   endif

 Arguments
   None.

 Description
   The endif statement closes the conditional construct started with
   the if statement.                                                          "

 Example
   #define EXAMPLE_STATEMEN
   #include example.hdr

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

   proc main
   Test_endif()
   endproc

See Also: if

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