Language Guide
CHAPTER 3
Values
54 Value Class Definitions
COERCIONS SUPPORTED
You can use the class identifier Number to coerce any value that can be coerced
to a Real value or an Integer value. However, the resulting value class is always
either Integer or Real:
set x to 1.5 as number
class of x --result: real
Real 3
Values that belong to the class Real are positive or negative numbers that can
include a decimal fraction, such as 3.14159 and 1.0.
LITERAL EXPRESSIONS
10.2579432
1.0
1.
As shown in the third example, a decimal point indicates a real number, even if
there is no fractional part.
Real numbers can also be written using exponential notation. A letter e is
preceded by a real number (without intervening spaces) and followed by an
integer exponent (also without intervening spaces). The exponent can be either
positive or negative. To obtain the value, the real number is multiplied by 10
to the power indicated by the exponent, as in these examples:
1.0e5 --equivalent to 1.0 * 10^5, or 100000
1.0e+5 --same as 1.0e5
1.0e-5 --equivalent to 1.0 * 10^-5, or .00001
PROPERTY
Class The class identifier for the object. This property is read-only, and
its value is always real.