EasyManuals Logo

Mitsubishi MELFA CR1D User Manual

Mitsubishi MELFA CR1D
458 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
Page #198 background imageLoading...
Page #198 background image
4-185 Detailed explanation of command words
4MELFA-BASIC IV
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 eight characters. Refer to the Page 129, "4.3.6 Types of characters
that can be used in program" for the characters that can be used.
(2) When designating multiple variable names, the maximum value (123 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Ã…i-2147483648Ã…`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)
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>]...

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Mitsubishi MELFA CR1D and is the answer not in the manual?

Mitsubishi MELFA CR1D Specifications

General IconGeneral
BrandMitsubishi
ModelMELFA CR1D
CategoryController
LanguageEnglish

Related product manuals