Commodore 16 User Manual page 80

Hide thumbs Also See for Commodore 16:
Table of Contents

Advertisement

EXAMPLES:
IF A=B AND C=D THEN 100
IF A=B OR C=D THEN 100
A=S:B=4:PR1NT A=B
A =5:B=4:PRINT A>B
PRINT 123 AND 15:PRINT S OR 7
requires both A=B & C=D to be
true
allows either A=B or C=D to be
true
displays a value of 0
displays a value of -1
displays 11 and 7
> or => is greater than or equal to
< > or > < is not equal to
Finally, there are three LOGICAL operators. with lower priority than
both arithmetic and relational operators:
AND
OR
NOT
These are used most often to join multiple formulas in IF . . THEN
statements. When they are used with arithmetic operators, they are
evaluated last (i.e., after + and -).
BASIC Abbreviation and Reference Chart
kerwOnD
ABBREVIATION
TYPE
(
ABS
a
SMFT
function—numeric
ASC
a
MOT
S
function—numeric
ATN
a
88MT
T
function—numeric
AUTO
a
SMPT
U
command
BACKUP
b
satyr
A
command
BOX
b
SHIT
0
statement
CHAR
ch
Sin
A
Statement
CHR$
c
881IT
H
function—string
CIRCLE
c
start
statement
CLOSE
cl
San
0
statement
CLR
c
SEIM
L
statement
CMD
c
SHIFT
M
statement
COLLECT
col
MUM
L
command
COLOR
co
MUFF
L
statement
CONT
c
SHWT
0
command
COPY
co
sant
P
command
COS
none
function—numeric
DATA
d
SMUT A
statement
DEC
rove
function—numeric
statement
DEF FN
d
air
E
DELETE
de
saner
L
command
DIM
d
SHIFT
I
statement
DIRECTORY
di
sant
R
command
DLOAD
d
=FT
L
command
DO
none
statement
DRAW
cl
SHIFT
R
statement
DSAVE
d
MOT
S
command
END
e
MUT N
statement
ERR$
e
SMET
R
function —string
function—numeric
EXP
e
MUTT
X
FOR
f
MOT
0
statement
FRE
f
SEWS
R
function—numeric
GET
g
E
statement
an
GETKEY
getk
S
E
statement
GET#
none
statement
GOSUB
go .SIXPT
S
statement
GOTO
g
Mr
0
statement
GRAPHIC
g
Oftt
R
statement
156
157

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Commodore 16 and is the answer not in the manual?

Questions and answers

Table of Contents