Data Type; Constants; Numeric Value Constants; Decimal Number - Mitsubishi Electric CR750-Q Instruction Manual

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

Advertisement

4MELFA-BASIC V

4.4.8 Data type

In MELFA BASIC V it is possible to use four data types: numerical values, positions, joints, and character
strings. Each of these is called a "data type." The numerical value data type is further classified into real
numbers and integers. There can be variables and constants of each data type.
Data type
Example)
Numeric value type M1 [Numeric value variables],1 [Numeric value constants] (Integer),
Position type
Joint type
Character type

4.4.9 Constants

The constant types include the numeric value constant, character string constant, position constant, joint
constant and angle constant.
Constants

4.4.10 Numeric value constants

The syntax for numeric value constants is as follows. Numerical constants have the following characteris-
tics.

(1) Decimal number

Example) 1, 1.7, -10.5, +1.2E+5 (Exponential notation)
Valid range -1.7976931348623157e+308 to 1.7976931348623157e+308

(2) Hexadecimal number

Example) &H0001, &HFFFF
Valid range &H0000 to &HFFFF

(3) Binary number

Example) &B0010, &B1111
Valid range &B0000000000000000 to &B1111111111111111

(4) Types of constant

The types of constants are specified by putting symbols after constant characters.
Example) 10% (Integer), 1.0005! (Single-precision real number), 10.000000003# (Double-precision real
number)

4.4.11 Character string constants

String constants are strings of characters enclosed by double quotation marks (").
Example) "ABCDEFGHIJKLMN" "123"
Up to 127 characters for character string
The character string can have up to 127 characters, including the step No. and double quotations.
Enter two double quotation marks successively in order to include the double quotation mark itself in a
character string. For the character string AB"CD, input "AB""CD".
4-138 Detailed specifications of MELFA-BASIC V
Numeric value type
Position type
Joint type
Character type
1.5 [Numeric value constants] (Real number)
P1 [Position variables], (0,0,0,0,0,0) (0,0) [Position constants]
J1 [Joint variables], (0,0,0,0,0,0) [Joint constants]
C1$ [Character string variables], "ABC" [Character string constants]
Numeric value constants
Character string constants
Position constants
Joint constants
Angle constants
Integer type
Real number type

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cr750Cr751-qCr751-dCr760-dCr760-qCr750-d

Table of Contents