Function _pards() Foundation

Writes a date value as a character string into a passed buffer.

Syntax
void _pards(CHAR cBuffer[8],
            XppParamList pList, ULONG ulIndex, ...);
Parameters
CHAR cBuffer[8]
Pointer to a buffer into which the date character string is to be written. The character string is always 8 characters long. Note, that it is not terminated with a NULL character.
XppParamList pList
Pointer to the Xbase++ parameter list, which is used to provide access to the parameter.
ULONG ulIndex
Position of the parameter containing the date value (first parameter is 1).
...
The remaining arguments must be of ULONG type and are only considered when the parameter <ulIndex> is an array. In this case, an index is specified for each array dimension to specify the element which contains the date. Note:The end of the array index list must be indicated by incorporating a NULL as the last value in the list.
Return

No return value.

Description

_pards() writes a date value which was passed as a parameter from Xbase++, into a buffer as a character string in the format "YYYYMMDD". The year is written with 4 digits, month and day with 2 digits, padded with zero if needed (Example: 7/22/94 -> "19940722"). Please note that the character string is not terminated with a NULL character.

When the parameter or the indexed array element do not contain a date value, the buffer is not changed. If the value is a NULL date, the character string is filled with blank spaces.

A static' array should not be used for the buffer. Since Xbase++ supports multithreading, each function can be active in more than one thread simultaneously.

Examples
/* 
Outputs a formatted date value to stdout. 
*/ 
#include <xpppar.h> 
#include <stdio.h> 

CHAR buffer[8]; 
                             /* Is parameter 3 a date? */ 
if ( XPP_IS_DATE( _partype(<pList>, 3) ) ) 
{ 
_pards(buffer, <pList>, 3); 
printf("%.2s. day in the %.2s. month of the year %.4s .\n", 
       &amp.buffer[6], &amp.buffer[4], buffer); 
} 
else 
printf("Error: Parameter 3 is not a date!\n"); 
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.