EasyManua.ls Logo

Mitsubishi QD51 - Page 27

Mitsubishi QD51
688 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
2 - 10 2 - 10
MELSEC-Q
2 THE BASICS OF AD51H-BASIC
2.7 Constants
Constants are fixed values used when a BASIC program is executed. There are two
types of constants: character constants and numeric constants.
2.7.1 Character string constants
Character string constants are any character strings that can be contained in a
character set up to a maximum of 255 characters enclosed by quotation marks (“).
Example
“HELLO”
“$25,000.00”
A character string that has a character length of 0 is
referred to as an empty character string.
In this manual, empty character strings are denoted by " ".
2.7.2 Numeric constants
Numeric constants are positive or negative numbers. Numeric constants cannot
contain any commas. There are the following 5 types of numeric constants.
(1) Integer constants
All integers between –32768 to +32767, with or without a % symbol. Decimal
points cannot be added.
Example
100
+123
-32768
32767%
(2) Fixed decimal point constants
Positive or negative real numbers (numbers that include decimal points),
including all integers that are not included in (1) above.
Example
100.0
-123.21
(3) Floating-point constants
Positive or negative numbers expressed in exponential format.
Floating-point constants are comprised of an integer or fixed decimal point
number (base number), followed by the letter E, and then an integer (exponent).
Floating-point constants can express values between 10
-38
to 10
+38
.
Example
235.988E-7 • • • • • 0.0000235988
2359E6 • • • • • 2359000000
(Double-precision floating-point constants use D instead of E.)

Other manuals for Mitsubishi QD51

Related product manuals