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>_pards() passes character pointer to clipper date</b> http://www.ousob.com [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
_pards()           Passes character pointer to Clipper date


Syntax Usage:  #include     "extend.h"

               char         *_pards(order [,index])

               int          order;  Placement in actual parameter list
               int          index;  Array element index

Description:   _pards() gets a date parameter from Clipper and returns a
               character pointer in the form YYYYMMDD.  Note that there
               is only one _pards() pointer on the stack.  Therefore you
               must strcpy() the result to a variable.  You cannot
               simply pass the pointer.


----------------------------------- Example --------------------------------

   In Clipper:

    CLEAR

    date1 = DATE()
    date2 = CTOD("06/19/56")
    date3 = CTOD("03/02/52")

    C_udf(date1, date2, date3)


   In C:

    #include "extend.h"

    CLIPPER c_udf()
    {
        char    str1[9];
        char    str2[9];
        char    str3[9];

        strcpy(str1, _pards(1));
        strcpy(str2, _pards(2));
        strcpy(str3, _pards(3));

        printf("DATE %s %s %s\r\n", str1, str2, str3);

    }


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