Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>__parinfo parameter type-checking</b> http://www.ousob.com [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
__PARINFO          Parameter type-checking


Syntax Usage:  . To obtain number of parameters passed:

                   mov   ax, 0
                   push  ax
                   call  __PARINFO
                   add   sp, 2

               . To obtain type of parameter passed:

                   mov   ax, <ORDER>
                   push  ax
                   call  __PARINFO
                   add   sp, 2

Argument:      <ORDER> is the placement order in the parameter list.

Description:   If the <ORDER> argument is zero, __PARINFO places the
               number of parameters passed in AX.  If the <ORDER>
               argument is greater than zero, __PARINFO places the type
               of the specified parameter in AX using the following
               values:

               Table: AX Values (__PARINFO)
               ---------------------------------------------
               Type         Value placed in AX
               ---------------------------------------------
               undefined            0
               character            1
               numeric              2
               logical              4
               date                 8
               by reference         32  ; OR with type
               memo                 65
               array                512
               ---------------------------------------------

               To check that a parameter has been passed by reference,
               add its type value to MPTR(32) and test for that sum.  If
               a character string was passed by reference, __PARINFO(N)
               should equate to 33.

Online resources provided by: http://www.ousob.com --- NG 2 HTML conversion by Dave Pearson