In this example, if X is less than 0, the

 

PRINT statement will be executed and

 

then the GOTO statement will branch to

 

line 350. If the X was 0 or positive,

 

BASIC will proceed to execute the lines

 

after line 26.

STATEMENT

SYNTAX/FUNCTION

LET

[LET] variable = expression

 

Assigns a value to a variable,

 

"LET" is optional.

STATEMENT

SYNTAX/FUNCTION

NEXT

NEXT [variable] [,variable] ...

 

Marks the end of a FOR loop.

 

If no variable is given, matches the most

 

recent FOR loop,

 

A single NEXT may be used to match

 

multiple FOR statements. Equivalent

 

to NEXT V:NEXT W.

STATEMENT

SYNTAX/FUNCTION

ON...GOSUB

ON expression GOSUB line [,line] ...

 

Identical to "ON...GOTO," except that

 

a subroutine call (GOSUB) is executed

 

instead of a GOTO. RETURN from the

 

GOSUB branches to the statement after

 

the ON...GOSUB.

STATEMENT

SYNTAX/FUNCTION

ON...GOTO

ON expression GOTO line [, line] ...

 

Branches to the line indicated by the

 

I'th number after the GOTO. That is:

 

IF I=1, THEN GOTO LINE 10

 

IF I=2, THEN GOTO LINE 20

 

IF I=3, THEN GOTO LINE 30

 

IF I=4, THEN GOTO LINE 40.

 

If I=0, or I attempts to select a nonexistent

 

line (>=5 in this case), the statement after

 

the ON statement is executed. However, if

 

I is >255 or <0, an FC error message will

 

result. As many line numbers as will fit on

 

a line can follow an ON...GOTO.

 

This statement will branch to line 40 if the

 

expression X is less than zero, to line 50 if

 

it equals zero, and to line 60 if it is greater

 

than zero.

STATEMENT

SYNTAX/FUNCTION

REM

REM any text

 

Allows the programmer to put comments

 

in his program. REM statements are not

 

executed, but can be branched to. A REM

 

statement is terminated by end of line, but

 

not by a ":".

 

In this case the V=0 will never be executed

 

by BASIC.

26 IF X<0 THEN PRINT "ERROR, X NEGATIVE": GOTO 350

EXAMPLE

300 LET W=X

310V=5.1

EXAMPLE

340NEXT V

345NEXT

350NEXT V,W

EXAMPLE

110 ON I GOSUB 50,60

EXAMPLE

100 ON I GOTO 10,20,

30,40

105 ON SGN(X)+2 GOTO 40,50,60

EXAMPLE

500 REM NOW SET V=0

505 REM SET V=0: V=0

Page 241
Image 241
Apple II manual Statement SYNTAX/FUNCTION LET, Statement SYNTAX/FUNCTION Next, Statement SYNTAX/FUNCTION ON...GOSUB

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.