Z1

ZIABCD (variable name too

long)

TP

TO (variable names cannot

be reserved words)

PSTG$

RGOTO (variable names cannot contain reserved words)

COUNT

 

 

ASSIGNING VARIABLES WITH A LET OR ASSIGNMENT STATEMENT

Besides having values assigned to variables with an input statement, you can also set the value of a variable with a LET or assignment statement.

Try the following examples:

A=5

PRINT A, A*2

510

LET Z=7

PRINT Z, Z-A

7 2

As you will notice from the examples, the "LET" is optional in an assignment statement.

BASIC "remembers" the values that have been assigned to variables using this type of statement. This "remembering" process uses space in the memory to store the data.

The values of variables are discarded (and the space in memory used to store them is released) when one of four conditions occur:

*A new line is typed into the program or an old line is deleted

*A CLEAR command is typed in

*A RUN command is typed in

*NEW is typed in

Another important fact is that if a variable is encountered in a formula before it is assigned a value, it is automatically assigned the value zero. Zero is then substituted as the value of the variable in the

particular formula. Try the example below:

PRINT Q;Q+2;Q*2 0 2 0

RESERVED WORDS

The words used as BASIC statements are "reserved" for this specific purpose. You cannot use these words as variable names or inside of any variable name. For instance, "FEND" would be illegal because "END" is a reserved word.

Table 206-1 is a list of the reserved words in BASIC.

Table 206-1. AIM 65 BASIC Reserved Words

ABS

FN

LIST

PRINT

SPC

AND

FOR

LOAD

POS

SQR

ASC

FRE

LOG

READ

STEP

ATN

GET

MID$

REM

STOP

CHR$

GOSUB

NEW

RESTORE

STR$

CLEAR

GOTO

NEXT

RETURN

TAB

CONT

IF

NOT

RIGHT$

TAN

COS

INPUT

NULL

RND

THEN

DATA

INT

ON

RUN

TO

DEF

LEFT$

OR

SAVE

USR

DIM

LEN

PEEK

SGN

VAL

END

LET

POKE

SIN

WAIT

EXP

 

 

 

 

 

 

 

 

 

Page 223
Image 223
Apple II manual Pstg$, Print A, A*2 LET Z=7 Print Z, Z-A, Reserved Words

II specifications

The Apple II, launched in April 1977, was one of the first highly successful mass-produced microcomputer products. It marked a significant leap in personal computing, setting standards for future developments in the industry. Created by Steve Wozniak and Steve Jobs, the Apple II differentiated itself with its user-friendly design, appealing aesthetics, and robust capabilities.

One of the standout features of the Apple II was its open architecture, which allowed users to expand and enhance the computer's functionality. This design enabled hundreds of third-party hardware and software developers to contribute to its ecosystem, resulting in an array of peripherals, including printers, modems, and storage devices. The Apple II utilized a MOS Technology 6502 microprocessor running at a clock speed of 1 MHz. Initially equipped with 4 KB of RAM, the machine could be expanded to 48 KB, accommodating more complex applications and programs.

The Apple II was also notable for its colorful graphics. It was one of the first computers to support color display, offering a 6-color palette with a resolution of 280x192 pixels in 16 colors when using its Color Graphics Card. This feature significantly enhanced the visual appeal of games and educational software developed for the platform, making computing more accessible and entertaining for various audiences.

Apple's commitment to user experience was evident in the design of the machine. It featured an integrated keyboard and a plastic case, which was both durable and visually appealing. The self-contained design included drive bays for floppy disk drives, allowing for quicker data access than traditional tape drives. It also supported audio output, enabling sound effects and music, a novelty at the time.

The introduction of the Apple DOS operating system further underscored the machine's capabilities. DOS streamlined file management and made it easier for users to navigate and manage their data. The combination of hardware and software positioned the Apple II as an educational tool and a gaming platform, fostering a vibrant software ecosystem.

The Apple II family continued to evolve, with variations like the Apple II+, IIe, and IIgs being introduced over the years. These iterations brought enhancements in memory, processing power, and graphics capabilities. The legacy of the Apple II endures, not only as a foundational product in personal computing but also as a symbol of innovation that paved the way for future advancements in technology. Its impact is still felt today, as it inspired countless developers and shaped the trajectory of the computer industry.