EasyManuals Logo

Radio Shack TRS-80 User Manual

Radio Shack TRS-80
236 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 #19 background imageLoading...
Page #19 background image
Chapter
3
"But
Can
It
Do
Math?"
Yes,
it
can.
Basic
arithmetic is a snap
for the TRS-80. So
are
highly complex math calcu-
lations
—
when you
write
special programs to
perform them. (More on this
later.)
LEVEL I
BASIC
uses
the four
fundamental
arithmetic
operations, plus
a
fifth which is just
a
modifications
of two of
the others.
1.
Addition,
using the
symbol
+
2.
Subtraction,
using the
symbol
—
(See
-
nothing to
this. Just
like
grade school. !
wonder
whatever happened
to old
Miss . .
.
Well,
ahem
-
anyway)
3.
Multiplication, using
the special symbol
*
(Oh
drat,
I
knew
this
was
too
easy to
he true!)
4.
Division,
using the
symbol
/
(
Well,
at
least it's
simpler
than the old
-v
symbol)
5.
Negation
(meaning
"multiply-times-minus-one"),
using
the
symbol
—
Now that
wasn't too bad,
was it? Be
careful.
You cannot
use an "X" for
multiplication.
Unfortunately,
a long
time
ago a
mathematician decided to
use "X", which is a
letter,
to
mean
multiply.
We use
letters
for other
things,
so it's
much
less confusing to use a
"*"
for
multiplication.
Confusion is
one thing a
computer
can't
tolerate.
So, to
computers,
"*"
is
the
only
symbol
which
means
multiply.
After using it a
while,
you,
too, may feel we
should
do
away with X as a
symbol
for
multiplication.
Putting all this
together
in a
program
is not difficult, so
let's do it.
First,
we have to
erase
the
"resident
program"
from
the
Computer's
memory.
Type the command
then
type
list
Bgjga
to
check
that there's
nothing left in
memory.
The Computer should
come back with a
simplex
Of bourse, we £Iko
need
that
old favorite, the
eqaifesigrj
(:">.-
8u$
wait
- -
the
BASIC
language
.
is
particular about how we use ibis
ai^il J&tit
expressions
(like 1
+
2
*
5)
can only
go on
the
right-hand side of
tfe
:
equals
sign;
i|ie.left-aand
:
":
sioW is reserved for
the
"
variable ti&me".
This
is
thg
name we give
to
tfce
result
of
the
math ex-
pression. {This all may seem a little strange^ hut...
it's
really quite
simple, as you
11
discover in the
next few.
pages.)
-
-
-
--
"Resident
program"
^computer
talk tor "what's
already in there".
17

Other manuals for Radio Shack TRS-80

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Radio Shack TRS-80 and is the answer not in the manual?

Radio Shack TRS-80 Specifications

General IconGeneral
BrandRadio Shack
ModelTRS-80
CategoryDesktop
LanguageEnglish

Related product manuals