
In This Chapter
4.1 Constants ..................................................................... 15
4.2 Variables...................................................................... 16
4.3 Expression and Operators............................................ 17
4.4 Operator Precedence.................................................... 19
4.5 Labels........................................................................... 20
4.6 Subroutines .................................................................. 20
4.7 Programming Style ...................................................... 21
4.1 Constants
Constants are the actual values that BASIC uses during execution. There are two types of
constants:
String
Numeric
4.1.1 String
A string constant is a sequence of up to 250 alphanumeric characters or symbols enclosed in
a pair of double quotation marks.
"Hello"
"$20,000.00"
"12 students"
4.1.2 Numeric
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
BASIC Compiler:
C H A P T E R 4
Basics of the BASIC Language
Komentarze do niniejszej Instrukcji