Qore Programming Language Reference Manual 2.1.1
Loading...
Searching...
No Matches
Pseudo_QC_Float.dox.h
1
3namespace Qore {
5/***/
6class <float> : public <value> {
7
8public:
10
24float abs();
25
26public:
28
63string format(string fmt);
64
65public:
67
91string format(int prec = 2, string decimal_sep = ".", string thousands_sep = "");
92
93public:
95
108bool infp();
109
110public:
112
123bool intp();
124
125public:
127
140bool nanp();
141
142public:
144
156int sign();
157
158public:
160
171bool strp();
172
173public:
175
196string toBase(int base = 10);
197
198public:
200
215
216public:
218
232bool val();
233};
234}
Methods in this pseudo-class can be executed on floating-point values.
Definition Pseudo_QC_Float.dox.h:6
bool val()
Returns True if the float is non-zero, False if zero.
string format(int prec=2, string decimal_sep=".", string thousands_sep="")
Returns a formatted string of the floating-point number according to format arguments.
string toBase(int base=10)
Converts the number to a different base (and returns it as a string).
bool intp()
Returns True because float values can be converted to integers.
int typeCode()
Returns Qore::NT_FLOAT.
float abs()
Returns the absolute value of the number.
string format(string fmt)
Returns a string of a formatted number according to a format string.
int sign()
Returns -1 if the number is negative, 0 if it is zero, or 1 if it is positive.
bool infp()
Returns True if the number is infinity (+ or -)
bool nanp()
Returns True if the number is NaN (not a number)
bool strp()
Returns True because float values can be converted to strings.
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
list< auto > list(...)
Returns a list of the arguments passed at the top level.
Qore namespace.
Definition QC_AbstractSmartLock.dox.h:2