EasyManua.ls Logo

Commodore Plus 4 - Control Statements and Loops; CHAPTER 7 Using Graphics and Color

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
71
Example:
10
OPEN"
l,8,4/'S0RT,S,W"
Opens
a
disk
file.
30
INPUT
"HOW
MANY
NAMES
TO
ENTER";T
40
FORX=1TOT
50
INPUT
"NEXT
NAME";
A$
60
PRINT#1
A*;V;
Puts
the
value input
70
NEXT
X
in
line
50
into
the
80
CLOSE
1
disk
file
SORT.
Closes
the disk
file.
NEW
10
INPUT
"STAFF
TO
RECEIVE
MEMO";
A$
20
OPEN
4,4
Accesses
printer.
30
PRINT#4,"MEM0"
Prints
to
printer.
40
PRINT#4,"T0
ALL
";A$;"
STAFF
MEMBERS"
50
CLOSE
4
PRINT
USING
or
PRINT#
USING
Abbrs.
?usI/pR/usI
PRINT
USING
format;
output
list
PRINTS
file
number,
USING
format;
output
list
Allows
you
to
design a
format
for
any
type
of
output—text
or
numbers.
You
can
use
up
to
nine
symbols
to
define
how
you
want
printed
material
to
appear.
The
PUDEF
command
lets
you
replace
up
to
four
of
the
PRINT
USING
symbols.
Parameters:
#logical
file
number,
"format
description";
items
to
be
printed
1.
Include
a
file
number
and
#
sign
if
you
are
writing
to
an
OPEN
file
or
device.
Omit
this
parameter
if
you
are
not
writing
to
a
file
or
device.
2.
The
format
description
can
contain
any
of
the
following
nine
symbols.
The
format
must
be
enclosed
in
quotes.
Symbol
Meaning
#
Represents
any
one
character.
If
the
item
to
be
printed
is
longer
than
the
number
of
#s
in
the
format,
and
the
item
is
numeric,
an
error
occurs
and
*s
are
printed
instead
of
numbers.
If
the
item
is
text,
only
as
many
characters
of
text
as
there
are
#s
are
printed.
,
Prints
a
comma
in
numbers,
which
you
cannot
ordinarily
do.
Place
the
comma
in
the
format
in
the
same
position
in
which
it
will
appear
in
the
number
to
be
printed.
Prints
a
decimal
point
in
numbers.
Only
one
decimal
point
can
appear
per
number
to
PRINT.
$
Prints
a
dollar
sign.
If
you
want
the
$
to
appear
right
next
to
any

Other manuals for Commodore Plus 4

Related product manuals