beautypg.com

Apple IIe User Manual

Page 39

background image

Page 39 of 74

IIe
Printed: Tuesday, March 4, 2003 10:40:15 AM

Using the Computer as a Calculator

When you're in the BASIC programming environment, you can use your Apple IIe as a calculator.
Try it; type this:
PRINT 2+2
and press Return.
If all went well, you should see the result of the calculation under your print statement, like
this:

PRINT 2+2 4

You don't have to preface your PRINT statement with a line number because you don't want to use
the calculation in a program you just want to print the results of the calculation on the
screen.

Here are the Applesoft BASIC equivalents of the addition, subtraction, multiplication and
division symbols and some sample calculations. Practice using these symbols now (and any time
you need to do some calculations and don't have your pocket calculator handy).

Don't forget to

start your calculation with the word PRINT.

+

addition -

subtraction *

multiplication /

division

PRINT 5+2 7
PRINT 5-2 3
PRINT 5*2 10
PRINT 5/2 2.5

More Elaborate Calculations:

You can combine several calculations in one PRINT statement.

Use parentheses to indicate which

calculations you want performed first.

For example: (9+4)*3.

Without quotation marks, the

result of the calculation would be 21.

With quotation marks, the result is 39.

A Shortcut:

If you like, you can use a question mark (?)

in place of the word PRINT. For example, you can

type ?

2+2 instead of PRINT 2+2.

Either way, you'll get 4 as a result.

Quick Calculations:

If you ever just want to use your Apple IIe for some quick calculations, you don't have to go
to the trouble of starting up the ProDOS User's Disk.

All you have to do is start up the Apple

IIe without a disk in drive 1, press CONTROL-RESET to turn off the disk drive, and start typing
your calculations.
Don't use this way of getting into BASIC if you plan on writing and saving a program!

Starting

up without a disk in drive 1 and pressing CONTROL-RESET gets you into BASIC, but it doesn't
load ProDOS, and without an operating system, your computer doesn't know how to communicate
with your disk drive.

Other Computer Languages

BASIC is just one of the programming languages available for the Apple IIe. The following
sections briefly introduce a few other popular computer languages available for the Apple IIe.
Your Apple dealer will be able to suggest particular packages and manuals for each programming
language.