Qore Programming Language Reference Manual  0.9.4.1
Pseudo_QC_Float.dox.h
1 namespace Qore {
4 /***/
5 class <float> : public <value> {
6 
7 public:
9 
23 float abs();
24 
25 public:
27 
55 string format(string fmt);
56 
57 public:
59 
83 string format(int prec = 2, string decimal_sep = ".", string thousands_sep = "");
84 
85 public:
87 
100 bool infp();
101 
102 public:
104 
115 bool intp();
116 
117 public:
119 
132 bool nanp();
133 
134 public:
136 
148 int sign();
149 
150 public:
152 
163 bool strp();
164 
165 public:
167 
188 string toBase(int base = 10);
189 
190 public:
192 
206 int typeCode();
207 
208 public:
210 
224 bool val();
225 };
226 };
<float>::nanp
bool nanp()
Returns True if the number is NaN (not a number)
<float>::intp
bool intp()
Returns True because float values can be converted to integers.
<float>::val
bool val()
Returns True if the float is non-zero, False if zero.
<float>
Methods in this pseudo-class can be executed on floating-point values.
Definition: Pseudo_QC_Float.dox.h:5
<float>::infp
bool infp()
Returns True if the number is infinity (+ or -)
<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.
<float>::strp
bool strp()
Returns True because float values can be converted to strings.
<float>::format
string format(string fmt)
Returns a string of a formatted number according to a format string.
<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:5
<float>::typeCode
int typeCode()
Returns Qore::NT_FLOAT.
Qore
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:2
<float>::sign
int sign()
Returns -1 if the number is negative, 0 if it is zero, or 1 if it is positive.