Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FreshWin (c) Fresh Technologies - <b>update...ifnum pseudo-function</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  UPDATE...IFNUM                                            Pseudo-Function
 Purpose..: Update an item only if another is numeric
-------------------------------------------------------------------------------
 Syntax...: UPDATE <nNo1> IFNUM <nNo2> [ TO <nNo3> ]

 Arguments: <nNo1>    = a variable to be updated.

            <nNo2>    = an item which is checked to ensure
                        it is numeric. Then it assigned to <nNo1>.
                        If not, then <nNo1> is set to NIL.

            [<nNo3>]  = if used, then it, rather than <nNo2>,
                        is assigned to <nNo1>.

 Remark...: The command is a #translate function.

               #command UPDATE <v1> IFNUM <v2> ;
                     => ;
                  iif( valtype( <v2> ) == "N", <v1> := <v2>, NIL )

               #command UPDATE <v1> IFNUM <v2> TO <v3> ;
                     => ;
                  iif( valtype( <v2> ) == "N", <v1> := <v3>, NIL )

            You must have a #include "FW_AIDS.CH" statement in your
            source code file to use the command.

 Source...: FW_AIDS.CH
-------------------------------------------------------------------------------
 Example..: To show the command, the count is to
            be updated if nTotal is numeric.
            ...
            UPDATE  nCnt IFNUM nTotal TO 183


See Also:

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