Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.3 . Technical Reference - <b>_parnd()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _parnd()
 Retrieve a numeric parameter as a double
------------------------------------------------------------------------------
 C Prototype

     #include "extend.api"
     double _parnd(
                    int iParamNum
                    [, int iArrayIndex]
                  )

 Arguments

     iParamNum is the one-based ordinal position of the parameter in the
     parameter list.

     iArrayIndex is an array index that specifies a particular element if
     the iParamNum parameter is an array.

 Returns

     _parnd() returns the value of the specified parameter as a double.

 Description

     _parnd() retrieves a numeric value passed as a parameter from CA-Clipper
     and converts it to a double-precision floating point value.

     _parnd() returns a far pointer to a statically allocated buffer that
     contains the double numeric value.  When you call _parnd() from C, the
     double value is automatically copied from the buffer into your C
     variable.  If you call from Assembly language, however, you should take
     care to preserve the double value since subsequent calls to _parnd()
     will overwrite the buffer.

 Examples

     .  From C:

        double num;
        num = _parnd(1);

     .  From Assembly language:

        EXTRN __parnd:FAR
              mov   ax, 1
              push  ax
              call  __parnd        ; value pointed to by DX:AX
              add   sp, 2          ; reset stack pointer
              mov   es, dx         ; load pointer in ES:BX
              mov   bx, ax         ; copy double into save area
                                   ; (creation of save area not shown)
                                   ;
              mov   word ptr MySaveArea, es:[bx]
              mov   word ptr MySaveArea+2, es:[bx+2]
              mov   word ptr MySaveArea+4, es:[bx+4]
              mov   word PTR MySaveArea+6, es:[bx+6]

 Files  Library is CLIPPER.LIB, header file is Extend.api.


See Also: _parni() _parnl() _retnd() _stornd()

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