A
artifact.one
Hello.
Does anybody know of a portable method to determine the maximum
number of characters required to hold an ASCII representation of
FLT_MAX, in 'long' notation (that is, with no exponential notation)?
Ideally, I'd like to be able to do this with a preprocessor macro.
It's actually for passing to sprintf(), but I'd like to pass the
'correct'
value as the 'size' parameter, as opposed to having snprintf() just
truncate the string.
thanks,
MC
Does anybody know of a portable method to determine the maximum
number of characters required to hold an ASCII representation of
FLT_MAX, in 'long' notation (that is, with no exponential notation)?
Ideally, I'd like to be able to do this with a preprocessor macro.
It's actually for passing to sprintf(), but I'd like to pass the
'correct'
value as the 'size' parameter, as opposed to having snprintf() just
truncate the string.
thanks,
MC