EasyManua.ls Logo

Atari XL

Atari XL
262 pages
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...
First
Steps 13
In
working
out
expressions
like
this,
the
computer
follows
strict
rules
about
the
order
in
which
the'
various
arithmetical
operations
are
performed.
First
The
expressions
inside
brackets
are
evaluated.
Second
Any
powers
(squares,
cubes,
etc.)
indicated
by
/\
are
worked
out.
Third
The
computer
performs
the
multiplications
and
divisions.
Fourth
The
additions
and
subtractions
are
performed.
If
you
are
unsure,
put
brackets
round
the
bit
you
.
want
calculated
first.
Try
the
following
examples,
and
see
if
you
can
work
out
the
answers
yourself
to
check
that
you
know
what
the
computer
is
doing.
PRINT 2 * 2 + 2 * 2
PRINT 2
+ 2 * 2 + 2
PRINT
6 + 3/ 5-4
PRINT 3
A 2 + 4
/\
3/ 2
PRINT
(3
+
4)
* 2
Both
text
and
numbers
can
be
printed
by a
single
PRINT
command
if
they
are
separated
by a
semi-
colon.
For
example:
PRINT
"3+5
=
";
3+5
DISPLAYING CHARACTERS
There
are
several
ways
in
which
the
characters
displayed
may
be
altered.

Related product manuals