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 - iifg() evaluate a conditional long expression http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 iifg()              Evaluate a conditional long expression
------------------------------------------------------------------------------
 Declaration
   system.hdr

 Syntax
   func long iifg extern
   param value logical lExpression, ;
         value long    gNumberTrue, ;
         value long    gNumberFalse

 Arguments
   lExpression is a conditional expression for evaluation.
   gNumberTrue is the value to return if lExpression is true.
   gNumberFalse is the value to return if lExpression is false.

 Return
   A long whose value depends on the result of conditional evaluation.

 Description
   The iifg() function evaluates lExpression and returns the long value
   supplied in either of the two alternative parameters, depending on the
   result of the conditional evaluation. Note that the function simply
   selects between the return values of the two alternative expressions,
   both of which are evaluated before the call.

 Example
   #define EXAMPLE_SYSTEM
   #include example.hdr

   proc SCRDRV ptr
   
   proc Test_iifg
   vardef
      ptr( SCRDRV ) pDriver
      logical       lDOS
   enddef
   lDOS := .t. // set this value according to the needs of the program
   pDriver := iifg( lDOS, &scrndos, &scrndirect ) // select screen driver
   pDriver()   // set the screen driver
   endproc

   proc main
   Test_iifg()
   endproc

See Also: if iifb() iifi() iifn()

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