version 2003
PA_FormatReal (value; format; result)
Parameter | Type | Description | |
value | double | The double to format | |
format | char * | Format to use | |
result | char * | Formated string of value |
Description
The routine PA_FormatReal returns in result the string form of the double you pass in value, according to the format that you specify in format.
This works like the String 4th Dimension function. Refer to the 4D Language Reference manual for more information.
Depending on default settings or on previous calls to PA_UsePStrings or PA_UseCStrings, format must be, and result will be a Pascal or a C string.
Example
Format a double value :
char result[256]; // using C strings under Windows PA_FormatReal("123456.78","$ ### ### ##0.00", result); // result is now "$ 123 456.78"
See Also
Error Handling
PA_GetLastError always returns eER_NoErr