![Mitsubishi Electric CR750 Series Скачать руководство пользователя страница 226](http://html.mh-extra.com/html/mitsubishi-electric/cr750-series/cr750-series_instruction-manual_238840226.webp)
4-206
Detailed explanation of command words
Def Inte/Def Long/Def Float/Def Double (Define Integer/Long/Float/Double)
[Function]
Use this instruction to declare numerical values. Inte stands for integer, Float stands for single-precision real
number, and Double stands for double-precision real number.
[Format]
[Terminology]
<Numeric value variable name> Designate the variable name.
[Reference Program]
(1) Definition of the integer type variable.
1 Def Inte WORK1, WORK2
' Declare WORK 1 and WORK 2 as an numeric value variable name.
2 WORK1 = 100
' Substitute the value 100 in WORK 1.
3 WORK2 = 10.562
' Numerical "11" is set to WORK2.
4 WORK2 = 10.12
' Numerical "10" is set to WORK2.
(2) Definition of long precision integer type variable
1 Def Long WORK3
2 WORK3 = 12345
(3) Definition of the single precision type real number variable.
1 Def Float WORK3
2 WORK3 = 123.468
' Numerical "123.468000" is set to WORK3.
(4) Definition of the double precision type real number variable.
1 Def Double WORK4
2 WORK4 = 100/3
' Numerical "33.333332061767599" is set to WORK4.
[Explanation]
(1) The variable name can have up to 16 characters. Refer to the
Page 136, "4.4.6 Types of characters that
for the characters that can be used.
(2) When designating multiple variable names, the maximum value (240 characters including command)
can be set on one step.
(3) The variable declared with Inte will be an integer type.(-32768 to +32767)
(4) The variable declared with Long will be a long precision integer type (-2147483648 to 2147483647)
(5) The variable declared with Float will be a single-precision type.(+/-1.38)
(6) The variable declared with Double will be a double-precision type.(+/-1.701411834308)
Def[]Inte[] <Numeric value variable name> [, <Numeric value variable name>]...
Def[] Long[] <Numeric value variable name> [, <Numeric value variable name>]...
Def[] Float[] <Numeric value variable name> [, <Numeric value variable name>]...
Def[]Double[] <Numeric value variable name> [, <Numeric value variable name>]...