TRS-80
MODEL III
710 REM
*#
THIS
720
REM
#•*
AND
730
REM
##
740 REM
*#
THIS
750 REM
**
VARI
760 REM
##
C
=
7/0
REM
##
D
=
780 REM
REM
Instructs
the Computer to ignore
the rest of the
program
line. This allows
you to
insert
comments (REMarks)
into your program for documentation. Then,
when you
(or someone else) look
at a listing of your program , it' 11 be
a
lot easier
to figure out.
If
REM is used in
a
multi-statement
program line, it must be the last
statement.
Example Program:
REMARK INTRODUCES
THE PROGRAM
**
POSSIBLY
THE PROGRAMMER,
TOO.
**
##
REMARK EXPLAINS
WHAT
THE
*#
>US VARIABLES
REPRESENTS
**
CIRCUMFERENCE R
:
=
RADIUS **
DIAMETER
**
Any alphanumeric
character
may be included in
a REM statement,
and the
maximum
length is the
same as that of other
statements: 255 characters
total
.
In Model III
BASIC, an apostrophe
'
(
(SHIFT)
CD)
may be used
as an abbreviation
for: REM.
100 A--1 'THIS? TOO
IS
A
REMARK
IF
true/false expression THEN
action-clause
Instructs
the Computer
to test the following
logical or
relational
expression.
If the
expression
is True,
control will proceed
to the
"action" clause
immediately
following
the expression.
If the expression
is
False, control will
jump
to the
matching
ELSE statement
(if there
is one) or down
to the next program
line.
In numerical
terms,
if the expression
has a non-zero
value, it
is always
equivalent
to
a logical
True.
Examples:
100 IF X
>
127 THEN PRINT
"OUT
OF
RANGE";
END
If
X is greater than
1
27
,
control will
pass to the PRINT
statement and
then to
the END
statement. But ifX
is
not
greater
than
127,
control will
jump down
to
the next line
in
the program,
skipping
the PRINT
and END statements.
IF
<= X
AND X
<=
Y THEN
Y
=
X
+
160
If both
expressions
are True
then Y will be assigned
the value
X +
1 80. Otherwise
control
will
pass directly
to the next
program line, skipping
the
THEN clause.
See THEN, ELSE.
160