EasyManua.ls Logo

Commodore Plus 4 - Page 65

Commodore Plus 4
464 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...
BASIC
Version
3.5
Commands,
Functions,
and System
Variables
53
Parameters:
file
number,
variable(s)
1.
The
file
number
is
a
logical
file
number
that
identifies
the
file
or
device
and
links
it
to
other
commands.
The
file
or
device
must
have
been
previously
accessed
by an
OPEN
command
with
the
same
logical
file
number.
2.
The
variable
type
must
match
the
type
of
value
to
be
assigned
(e.g.,
if
you
are
assigning
text values,
you
must
use
text-string
variables).
If
the'
INPUT#
command
contains
more
than
one
variable,
separate
the
variables
with
commas.
Example:
10
OPEN
8,8,15
Accesses
the
disk
drive
error
channel.
20
INPUT#8,
U,
E$,
T,
S
Gets
three
numeric
and
one
text-string
values
from
the
channel
and
assigns
them
to
N,
E$,
T,
and
S.
30
PRI1TT
M",
E$,
T,
S
Prints
the
values
on
the
screen.
40
CLOSE
8
Closes
the
disk
channel.
INSTR
Abbr.
inS
INSTR
(master
string,
substring,
start
position)
You
can
find
the
position
of a
text string
within
another
text
string
by
using
the
INSTR
function.
INSTR
returns
a
number
that
represents
the
character
position
in
the
master
string
where
the
sought
string
begins.
If
the
sought
string
is
not
present,
a
value
of
0
is
returned.
The
INSTR
function
has
an
optional
parameter
that
lets
you
begin
the
text-
string
search
at
any
character
location
in
the
master
string.
Use
this
option
if
you
have
found
one
instance
of
the
sought
string
and
want
to
search
for
additional
appearances
of
the
sought
string
or
if
you
want
to
begin
the
search
after
some
known
occurrence
of
the
sought
string.
This
option
is
the
only
way
to
find
additional
instances
of
the
sought
string.
Parameters:
master
string,
sought
string,
starting
position
1.
The
master
string
is
the
text
string
being
searched.
It
can
be
any
text
string
enclosed
in
quotes.
You
can
also
use
a
text-string
variable
or
string
expression
as
this
parameter.
Only
text-string
values
are
allowed.
Note
that
blanks
and
punctuation
marks
are
counted
as
character
positions.
2.
The
sought
string
is
the
text
for
which
you
are
searching
the
master
string.
The
sought
string
can
be
any
text
string
enclosed
in
quotes.
You
can
also
use
a
text-string
variable
or
string
expression
as
this
parameter.
Only
text-string
values
are
allowed
in
the
INSTR
function.
3.
The
starting
position,
which
is
optional,
is
a
number
representing
the
character
position
in
the
master
string
where
you
want
to
begin
the
search.
The
default
is
the
first
position
in
the
master
string.
Once
you
have
found
one
instance
of
the
sought
string,
you
can
search
for
another
by
issuing
another
INSTR
command
using
the
location
of
the
found
string
+
1
as
the
starting
position.

Other manuals for Commodore Plus 4

Related product manuals