EasyManua.ls Logo

Commodore Plus 4 - Page 69

Commodore Plus 4
234 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...
n
IMMEDIATE
You
can
Put
any
calculation
in
a
program,
or
get
an
immediate
answer
MODE
Dy
'yPin9
PRINT
and
the
problem
without
a
line
number
and
pressing
RETURN,
like
this:
PRINT
3-6
3
PRINT
24/(6
3
■2)
With
numbers
as
well
as
with
commands
and
text,
when
you
don't
have
a
line
number
before
a
BASIC
statement,
you
don't
have
to
type
RUN
to
tell
the
computer
to
fohow
the
instruction;
it's
in
IMMEDIATE,
or
DIRECT
MODE.
Having
a
line
number
means
the
statement
is
part
of
a
BASIC
program;
it's
in
PROGRAM
MODE.
Either
way
is
acceptable.
You
can
also
include
both
a
text
statement
in
quotation
marks
and
a
mathematical
problem
to
be
solved
in
a
single
PRINT
statement
in
immediate
mode.
PRINT
"2
TO THE
3RD
POWER
EQUALS";2I3
2
TO
THE
3RD
POWER
EQUALS
8
this
arrow
stands
for
exponentiation,
get
it
by
typing
SHIFT
andO
the
message
is
PRINTed
and
then
the
problems
solu
tion
is
PRINTed
ORDER
T(ie
second
example
in
the
last
section
shows
that
you can
perform
fie
more
than
one
calculation
in
one
line.
Try
typing
this
CALCULATION
PRINT200+50/B
Is
the
answer
what
you
expected?
Try
this
PRINT
(200-50)
5
Your
PlusM
always
performs
calculations
in
a
certain
order.
Problems
are
solved
from
left
to
right;
within
that
general
rule,
some
types
of
calculations
are
solved
first.
The
order
which
your
Plus/4
evaluates
expressions
is
called the
order
of
precedence
of
operators.

Other manuals for Commodore Plus 4

Related product manuals