T-60 basic programming language, Variables, constants, and strings – MITSUBISHI ELECTRIC T-60 User Manual
Page 45
T-60 Basic Programming Language
This chapter gives an overview of the capabilities of the EMERSON EMC
BASIC. The BASIC language integrated into the T-60 has been custom
designed and optimized for speed of execution and ease of use with the
specific hardware features of the T-60. A complete description of the syntax
is available in the EMERSON EMC BASIC PROGRAMMING GUIDE. This
guide is provided with the T-60 and is available from EMERSON EMC or
your EMERSON EMC DISTRIBUTOR.
Variables, Constants, and Strings
The EMERSON EMC BASIC has a range of numeric and string variable and
constant types. Variable names may be up to 8 characters long. The
characters allowed in a variable name are letters, numbers, and the decimal
point. The first character in the variable name must be a letter. Special type
declaration characters are also allowed. The types and their dynamic ranges:
Type:
Symbol:
Description:
Float!
(or none)
Floating point numeric variables and constants.
Positive or negative numbers represented in
exponential form (similar to scientific notation).
A floating-point constant consists of an optionally-
signed integer or fixed-point number (the mantissa),
followed by the letter E and an optionally signed
integer (the exponent). The allowable range for
floating-point constants is 0.8388607X10
-19
to
-0.8388607X10
14
. For example:
235.988E-7 = .0000235988
2359E6 = 2359000000
Integer
%
Integer numeric variables and constants. Whole
numbers between -32768 and +32767. They do not
contain decimal points.
Double-
&
Double precision variables and constants. Whole
Precision
numbers between -2147483648 and +2147483647.
Integer
They do not contain decimal points.
String
$ String variables and constants. A string can consist
of up to 127 alphanumeric characters.The default type
for a numeric variable name is single-precision.You
should be very careful when making conversions between
integer, single-precision, and double-precision integers
‘
variables, rounding errors may occur.
Double-precision integers are useful for moderately fast math functions.
Many different types of machine controllers require double precision numeric
ranges for their input. Double-precision integers were implemented
primarily for this purpose.
T-60 Basic Programming Language
Variables, Constants, and Strings
37