PA_FormatReal

4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next

version 2003


PA_FormatReal (value; format; result)

ParameterTypeDescription
valuedoubleThe double to format
formatchar *Format to use
resultchar *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

PA_FormatLongint, String.

Error Handling

PA_GetLastError always returns eER_NoErr


4D - Documentation   Français   English   German   4D Plugin API, Command Theme List   4D Plugin API, Command Alphabetical List   Back   Previous   Next