| Qore Programming Language Reference Manual 1.0.8

Pseudo_QC_Float.dox.h
1
3 namespace Qore {
5 /***/
6 class <float> : public <value> {
7
8 public:
10
24 float abs();
25
26 public:
28
56 string format(string fmt);
57
58 public:
60
84 string format(int prec = 2, string decimal_sep = ".", string thousands_sep = "");
85
86 public:
88
101 bool infp();
102
103 public:
105
116 bool intp();
117
118 public:
120
133 bool nanp();
134
135 public:
137
149 int sign();
150
151 public:
153
164 bool strp();
165
166 public:
168
189 string toBase(int base = 10);
190
191 public:
193
207 int typeCode();
208
209 public:
211
225 bool val();
226 };
227 }
<float>::toBase
string toBase(int base=10)
Converts the number to a different base (and returns it as a string).
<float>::abs
float abs()
Returns the absolute value of the number.
<value>
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
<float>::infp
bool infp()
Returns True if the number is infinity (+ or -)
<float>::format
string format(string fmt)
Returns a string of a formatted number according to a format string.
<float>
Methods in this pseudo-class can be executed on floating-point values.
Definition: Pseudo_QC_Float.dox.h:6
<float>::typeCode
int typeCode()
Returns Qore::NT_FLOAT.
<float>::nanp
bool nanp()
Returns True if the number is NaN (not a number)
<float>::sign
int sign()
Returns -1 if the number is negative, 0 if it is zero, or 1 if it is positive.
<float>::strp
bool strp()
Returns True because float values can be converted to strings.
Qore
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:3
<float>::val
bool val()
Returns True if the float is non-zero, False if zero.
<float>::intp
bool intp()
Returns True because float values can be converted to integers.