82string format(
int prec = 2,
string decimal_sep =
".",
string thousands_sep =
"");
Methods in this pseudo-class can be executed on arbitrary precision number values.
Definition: Pseudo_QC_Number.dox.h:6
int prec()
Returns the precision of the current number.
string format(int prec=2, string decimal_sep=".", string thousands_sep="")
Returns a formatted string of the number according to format arguments.
int sign()
Returns -1 if the number is negative, 0 if it is zero, or 1 if it is positive.
bool val()
Returns True if the number is non-zero, False if zero.
number abs()
Returns the absolute value of the number.
bool strp()
Returns True because number values can be converted to strings.
bool nanp()
Returns True if the number is NaN (not a number)
bool infp()
Returns True if the number is infinity (+ or -)
string format(string fmt)
Returns a formatted string of the number according to the format argument.
bool intp()
Returns True because number values can be converted to integers.
int typeCode()
Returns Qore::NT_NUMBER.
string toBase(int base=10)
Converts the number to a different base (and returns it as a string).
string toString(int fmt)
Returns the string representation of the number according to the format argument.
Methods in this pseudo-class are available to be executed on any value type (even NOTHING); this is t...
Definition: Pseudo_QC_All.dox.h:6
number number()
Always returns 0.0.
Qore namespace.
Definition: QC_AbstractSmartLock.dox.h:2