You are viewing an older version of the site. Click here to view
the latest version of this page. (This may be a dead link, if so, try the root page of the docs
here.)
Numeric literals in MethodScript source are handled as 64 bit values.
For floating point values, that is, numbers with a decimal, the max value is
1.7976931348623157E308 and the minimum value is
4.9E-324. For integral values, the max value is
9223372036854775807 and the minimum value is
-9223372036854775808. Undefined numbers and Infinite values
are not supported.
Integral numbers may be written in source as binary or hexadecimal or octal values.
For instance, 15 may be written as either
15
, 0b1111
,
0xF
, or 0o17
. Binary values must start with "0b" and may only contain
the numbers "1" or "0" (base 2). Hexadecimal numbers start with "0x" and may only contain
the numbers 0-9, and a-f, either lowercase or uppercase (base 16). Octal numbers must start
with "0o" (zero, lowercase letter o), and may only contain 0-7 (base 8). Binary, hexadecimal,
and octal values may only be integral values.
{{LearningTrail}}Find a bug in this page? Edit this page yourself, then submit a pull request.