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.)
Содержание A1SD51S
Страница 183: ...11 13 11 13 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS RUN Before swap A 0 H924 A 1 H1159 After swap A 0 H1159 A 1 H924 OK...
Страница 331: ...11 161 11 161 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CON ON OFF STOP and ZOPEN functions and Section 7 4...
Страница 557: ...11 387 11 387 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the CHR SPACE and SPC functions...
Страница 629: ...11 459 11 459 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZOPEN ZSEND and ZCNTL instructions and Section 7 3 4...
Страница 645: ...11 475 11 475 MELSEC Q 11 INSTRUCTIONS AND FUNCTIONS REMARK See the ZEVENT ZSIGNAL and DEF ZEVENT instructions...