realtostr
realtostr |
Purpose
Generate the textual representation of a real value.
Synopsis
int realtostr(XPRMcontext ctx, char *buf, int bufsize, const char *realfmt, double v);
Arguments
ctx
|
Mosel's execution context
|
buf
|
Text buffer to store the resulting string
|
bufsize
|
Size of
buf
|
realfmt
|
C format for the conversion (may be
NULL)
|
v
|
Value to convert
|
Return value
Length of the generated string.
Further information
This function performs the same conversion as
printf, in particular it handles special values
nan and
inf and reports
0 if the value to convert is smaller than the current zero tolerance (Mosel parameter
zerotol). If the provided
realfmt is
NULL, the format defined in the current context is used (Mosel parameter
realfmt).
Related topics