EasyManuals Logo
Home>Atari>Desktop>XL

Atari XL User Manual

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
Page #73 background imageLoading...
Page #73 background image
CHAPTER
8
FUNCTIONS
A
'function'
in
computing
is
an
instruction
which
performs
a
calculation
on a
number.
There
are
a
number
of
functions
available
on
the
Atari
XL.
For
example,
in
Chapter
7
functions
were
described
which
operate
on
numbers
to give
strings,
or
on
strings
to
give
numbers.
In
this
chapter
we
will
look
at
some
more
of
the
functions
available
on
the
Atari.
SQUARE
ROOTS
The
square
root
of
a
number
is
calculated
by
the
function
SQR(N).
The
square
root
of
a
number
or
variable
N
is
the
number
which
when
multiplied
by
itself,
or
squared,
gives
N.
Try:
PRINT
SQR(4)
The
Atari
displays
2,
because
2
squared
(2*2)
is
4.
10
FOR N = 1 TO
10
20 PRINT N, SQR(N)
30
NEXT
N
prints
the
numbers
1 to 10
and
their
square
roots.
63

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Atari XL and is the answer not in the manual?

Atari XL Specifications

General IconGeneral
BrandAtari
ModelXL
CategoryDesktop
LanguageEnglish

Related product manuals