3 floating-point constant, Named constant, Floating-point constant – ElmoMC Multi-Axis Motion Controller-Maestro User Manual
Page 69

5.1.6.3
Maestro
Software Manual
MAXL Program Language
MAN-MASSW (Ver. Q)
Floating-Point Constant
Floating-point constants specify values that must have a fractional part. These values
contain decimal points (.) and can contain exponents.
Syntax
floating-constant :
fractional-constant <exponent-part> // <> indicates option
digit-sequence exponent-part
fractional-constant :
<digit-sequence> . digit-sequence
digit-sequence .
exponent-part :
e <sign> digit-sequence
E <sign> digit-sequence
sign : one of
+ –
digit-sequence :
digit
digit-sequence digit
Floating-point constants have a “mantissa,” which specifies the value of the number,
an “exponent,” which specifies the magnitude of the number, and an optional suffix
that specifies the constant’s type. The mantissa is specified as a sequence of digits
followed by a period, followed by an optional sequence of digits representing the
fractional part of the number. For example:
18.46
38.
The exponent, if present, specifies the magnitude of the number as a power of 10, as
shown in the following examples:
18.46e0 // 18.46
18.46e1 // 184.6
If an exponent is present, the trailing decimal point is unnecessary in whole numbers
such as 18E0.
5-7