Mitsubishi Electric CR750-Q Instruction Manual page 226

Cr750/cr751/cr760 series
Hide thumbs Also See for CR750-Q:
Table of Contents

Advertisement

4MELFA-BASIC V
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]
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>]...
[Terminology]
<Numeric value variable name> Designate the variable name.
[Reference Program]
(1) Definition of the integer type variable.
1 Def Inte WORK1, WORK2
2 WORK1 = 100
3 WORK2 = 10.562
4 WORK2 = 10.12
(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
(4) Definition of the double precision type real number variable.
1 Def Double WORK4
2 WORK4 = 100/3
[Explanation]
(1) The variable name can have up to 16 characters. Refer to the
can be used in program"
(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.70141E+38)
(6) The variable declared with Double will be a double-precision type.(+/-1.701411834604692E+308)
4-206 Detailed explanation of command words
' Declare WORK 1 and WORK 2 as an numeric value variable name.
' Substitute the value 100 in WORK 1.
' Numerical "11" is set to WORK2.
' Numerical "10" is set to WORK2.
' Numerical "123.468000" is set to WORK3.
' Numerical "33.333332061767599" is set to WORK4.
for the characters that can be used.
Page 136, "4.4.6 Types of characters that

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cr750Cr751-qCr751-dCr760-dCr760-qCr750-d

Table of Contents