_RetFloat( ) API Library Routine

See Also   Example

Sets the library return value to a float value.

Syntax

void _RetFloat(double flt, int width, int dec)
double flt;                  /* Double precision floating point value. */
int width;                     /* Number of columns for number display. */
int dec;                     /* Number of decimal places. */

Remarks

The width parameter specifies the number of columns Visual FoxPro uses when displaying the number, including a decimal point if one is needed. If you don't know the width, use 20. The dec parameter specifies the number of decimal places in the number. You must correctly set the number of decimal places to guarantee that Visual FoxPro correctly processes the number. If the number of decimal places isn't zero, the width must be at least two greater than dec.

For more information on how to create an API library and integrate it with Visual FoxPro, see Chapter 28, Accessing the Visual FoxPro API, in the Programmer's Guide.