FNJ7, FNKO, FNR2. User defined func-

 

tions are restricted to one line. A function

 

may be defined to be any expression, but

 

may only have one argument. In the

 

example, B and C are variables that are used

 

in the program. Executing the DEF state-

 

ment defines the function. User defined

 

functions can be redefined by executing

 

another DEF statement for the same

 

function. "V" is called the dummy variable.

 

Execution of this statement following the

 

above would cause Z to be set to 3/B+C,

 

but the value of V would be unchanged.

STATEMENT

SYNTAX/FUNCTION

DIM

DIM variable (size 1, [size 2...])

 

Allocates space for matrices. All matrix

 

elements are set to zero by the DIM

 

statement.

 

Matrices can have from one to 255

 

dimensions.

 

Matrices can be dimensioned dynamically

 

during program execution. If a matrix is

 

not explicitly dimensioned with a DIM

 

statement, it is assumed to be a single

 

dimensioned matrix of whose single

 

subscript may range 0 to 10 (eleven

 

elements).

 

If this statement was encountered before a

 

DIM statement for A was found in the

 

program, it would be as if a DIM A(10)

 

had been executed previous to the execu-

 

tion of line 117. All subscripts start at

 

zero (0), which means that DIM X(100)

 

really allocates 101 matrix elements.

STATEMENT

SYNTAX/FUNCTION

END

END

 

Terminates program execution without

 

printing a BREAK message. (See STOP.)

 

CONT after an END statement causes

 

execution to resume at the statement after

 

the END Statement. END can be used

 

anywhere in the program, and is optional.

STATEMENT

SYNTAX/FUNCTION

FOR

FOR variable = expression to expression

 

[STEP expression] (See NEXT statement)

 

V is set equal to the value of the expression

 

following the equal sign, in this case 1. This

 

value is called the initial value. Then the

 

statements between FOR and NEXT are

 

executed. The final value is the value of the

 

expression following the TO. The step is

 

the value of the expression following STEP.

 

When the NEXT statement is encountered,

 

the step is added to the variable.

 

If no STEP was specified, it is assumed to

 

be one. If the step is positive and the new

 

value of the variable is <= the final value

 

(9.3 in this example), or the step value is

 

negative and the new value of the variable

100 Z=FNA(3)

EXAMPLE

113 DIM A(3),B(10)

114 DIM R3(5,5), D$(2,2,2)

115 DIM Q1(N),Z(2*I)

117 A(8)=4

EXAMPLE

999 END

EXAMPLE

300 FOR V=1 TO 9.3 STEP .6

310 FOR V=1 TO 9.3

Page 239
Image 239
Apple II manual Statement SYNTAX/FUNCTION DIM, Statement SYNTAX/FUNCTION END, Statement SYNTAX/FUNCTION For

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.