21
Constants
Character
Numeric
Integer
Decimal
Octal
Hexadecimal
Real Number
Single-precision
Double-precision
Character Constants
A character constant is a character string enclosed by double quotation
marks (”). It can be up to 255 characters long. If it has no character, it is
called an “empty character string” or a null string.
Example: “CF-BASIC”
Integer Constants
Whole numbers between -32768 and 32767 can be used. An optional per-
cent sign (%) can be added to specifically indicate an integer constant. Inte-
ger constants do not have decimal points.
Examples: 1234 -1234 12
Octal Constants
Octal numbers 0 through 7 beginning with the prefix “&” and within the range
of &0 to &177777 can be used.
Examples: &0127 &7777
Hexadecimal Constants
Hexadecimal numbers with the prefix “&H”, from 0 to F (0 to 9,A,B,C,D,E,F)
and in the range &H0000 to &HFFFF can be used.
Examples: &H5E &HBF4
Floating Point Constants
Single precision: This type of constant is stored with seven-digit precision
and is output as a six-digit constant with the seventh digit rounded off. It is
represented by one of the following methods:
1, 2, 3... 1.
As a number with seven or less digits: 1234.5
2.
As a number in exponential form using E: 1.2E+3
3.
As a number with the character “!” at the end: 2.34!
Double precision: This type of constant is stored with 16-digit precision and is
output as 16 digits or less. It is represented by one of the following methods:
1, 2, 3... 1.
As a number with 8 or more valid digits: 1.23456789
2.
As a number in exponential form using D: -1.2D-3
3.
As a number with the character “#” at the end: 2.34#
Variables
Variables are names used to represent values that are used in a BASIC pro-
gram. The value of a variable may be assigned as the result of calculations
or explicitly by the programmer with an assignment statement. If no value is
assigned to a numeric variable, it is assumed to be zero. If no value is as-
signed to a character variable, it is assumed to be a null string.
Variable Name
A variable may be up to 255 alphanumeric characters long, but only the first
16 characters are actually valid. No variable can start with “FN” or a valid
BASIC command name.
If a parameter begins with a reserved word, syntax error will occur. TOTAL
and ABSOL, for example, cannot be used because they include reserved
words TO and ABS. Syntax errors will result if these parameters are used.
Type Declarator
The variable TYPE must be declared. This is done using a type declarator
which is placed after the variable name. Even if two variables have the same
name, they will be treated differently if they are declared as different types of
variables.
Program Configuration
Section 4-1
Содержание SYSMAC C200H-ASC02
Страница 1: ...Cat No W165 E1 04 ASCII Unit SYSMAC C200H ASC02 ...
Страница 2: ...C200H ASC02 ASCII Unit Operation Manual Revised September 2002 ...
Страница 3: ...iv ...
Страница 5: ...vi ...
Страница 7: ...TABLE OF CONTENTS viii Glossary 159 Index 163 Revision History 165 ...
Страница 122: ...Appendix B Specifications 115 130 35 100 5 ...
Страница 167: ...Cat No W165 E1 04 Note Specifications subject to change without notice Printed in Japan Authorized Distributor ...
Страница 168: ...Cat No W165 E1 04 C200H ASC02 ASCII Unit OPERATION MANUAL ...