Loading...
Searching...
No Matches
Pseudo_QC_Float.dox.h
namespace Qore {
/***/
class <float> : public <value> {
public:
float abs();
public:
string format(string fmt);
public:
string format(int prec = 2, string decimal_sep = ".", string thousands_sep = "");
public:
bool infp();
public:
bool intp();
public:
bool nanp();
public:
int sign();
public:
bool strp();
public:
string toBase(int base = 10);
public:
int typeCode();
public:
bool val();
};
}
<float>
Methods in this pseudo-class can be executed on floating-point values.
Definition Pseudo_QC_Float.dox.h:6
<float>::val
bool val()
Returns True if the float is non-zero, False if zero.
<float>::format
string format(int prec=2, string decimal_sep=".", string thousands_sep="")
Returns a formatted string of the floating-point number according to format arguments.
<float>::toBase
string toBase(int base=10)
Converts the number to a different base (and returns it as a string).
<float>::intp
bool intp()
Returns True because float values can be converted to integers.
<float>::typeCode
int typeCode()
Returns Qore::NT_FLOAT.
<float>::abs
float abs()
Returns the absolute value of the number.
<float>::format
string format(string fmt)
Returns a string of a formatted number according to a format string.
<float>::sign
int sign()
Returns -1 if the number is negative, 0 if it is zero, or 1 if it is positive.
<float>::infp
bool infp()
Returns True if the number is infinity (+ or -)
<float>::nanp
bool nanp()
Returns True if the number is NaN (not a number)
<float>::strp
bool strp()
Returns True because float values can be converted to strings.
<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
Qore
main Qore-language namespace
Definition Pseudo_QC_All.dox.h:3