17
The chapter describes the basics of the CipherLab BASIC language.
3.1 Constants .................................................................. 17
3.2 Variables.................................................................... 18
3.3 Expression and Operators ............................................ 21
3.4 Operator Precedence ................................................... 23
3.5 Labels ....................................................................... 23
3.6 Subroutines ................................................................ 24
3.7 Programming Style ..................................................... 26
Constants are the actual values that BASIC uses during execution. There are two types of
constants:
String
Numeric
A string constant is a sequence of up to 255 alphanumeric characters or symbols
enclosed in a pair of double quotation marks.
“Hello”
“$20,000.00”
“12 students”
Numeric constants include positive and negative numbers. Numeric constants in BASIC
cannot contain commas. There are three types of numeric constants that can be used in
the CipherLab BASIC Compiler:
Integer Constants:
Whole numbers between –
32,768 and + 32,767. No decimal
point.
Real Number Constants:
Positive or negative real numbers, that is, numbers tha
a decimal point, such as 5.34 or – 10.0.
Long Integer Constants:
Whole numbers between – 2,147,483,648 and + 2,147,483,647.
BASICS OF THE CIPHERLAB BASIC LANGUAGE