EasyManua.ls Logo

Radio Shack TRS-80 PC-2 - Page 13

Radio Shack TRS-80 PC-2
35 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
ERL has same
syntax
as
any
other
function
which
returns
a
number
in
that
a
statement
or
variable
must
be used.
For
example,
PRINT
ERL
and
I =
ERL
are
both
valid
uses.
To
display
error
and
end
error
line
numbers
if
errors
occur
in
a BASIC
program,
use
the
following
sequence:
100
ON
ERROR
GOTO
9000
9000
PRINT
"ERROR";
ERN;"
IN
LINE";
ERL
ERN
Return Error Code
ERN
ERN
is
for
use in
error
trapping
in
conjunction
with
ON
ERROR
GOTO. ERN
returns
the
number
(i.e.,
code)
of
the
current
error,
or
0 if an
error
has
not
occurred.
ERN has
the
same
syntax
as
any
other
function
which
returns a
numeric
quantity.
For
example,
PRINT
ERN
and B
= ERN are
both
val
id
uses. (See
example
for
ER
L.)
FEED
Transmit
Carriage
Return/Line
Feed
Sequences
FEED
n
n
is
number
from 1
to
65535
n
is
optional;
if
omitted,
0
is
used.
20
FEED
transmits
a specified
number
of
end-of-line
sequences (as
defined
by
CONSOLE).
FEED
interacts
with
the
RS-232C
just
as LF
interacts
with
the
printer.
For
example,
to
transmit
six
end
of
line groups,
enter:
FEED
6
(ENTER)
To
list
the
current
contents
of
an
array
A$
(10) with
three
carriage return/I inefeed groups
at
the
end
of
each string,
use a
command
sequence
similar
to
the
following:
100
CONSOLE
0,0,
1
110
FOR I
=0
to
10
120
PRINT
#-8,
A$(I)
130
FEED
2
140
NEXT
I
Note
that
FEED
2 will generate
three
end-of-line
sequences because
the
first
is
automatically
sent
at
the
end
of
the
PR INT
statement.
INPUT$
Input
a String
of
Characters from
the
RS-232C
INPUT$
"prompt";
variable
prompt
is
the
message
you
want
displayed.
prompt
is
optional;
if
omitted,
a
question
mark
(?) will be displayed.
variable represents
the
data
to
be
typed
in.
INPUT$
is
a variant
of
BASIC's INPUT
function,
differing
from
that
function
in
two
ways.
INPUT$ requests its
data
from
the
RS-232C, instead
of
the
keyboard.
21

Related product manuals