Apple II Additional String Considerations, Name Example PURPOSE/USE DIM, Input Input X$, Del

Models: II

1 257
Download 257 pages 49.17 Kb
Page 232
Image 232

ADDITIONAL STRING CONSIDERATIONS

1.A string may contain from 0 to 255 characters. All string variable names end in a dollar sign ($); for example, A$, B9$, K$, HELLO$.

2.String matrices may be dimensioned exactly like numeric matrices. For instance,

DIM A$(10,10) creates a string matrix of 121 elements, eleven rows by elevon columns (rows 0 to 10 and columns 0 to 10). Each string matrix element is a complete string, which can be up to 255 characters in length.

NAME

EXAMPLE

PURPOSE/USE

----

-------

-----------

DIM

25 DIM A$(10,10)

Allocates space for a pointer and length for

 

 

each element of a string matrix. No string

 

 

space is allocated.

LET

27 LET A$="FOO"+V$

Assigns the value of a string expression to

 

 

a string variable. LET is optional.

=

 

String comparison operators. Comparison

>

 

is made on the basis of ASCII codes, a

<

 

character at a time until a difference is

<= or =<

 

found. If during the comparison of two

>= or =>

 

strings, the end of one is reached, the

<>

 

shorter string is considered smaller.

 

 

Note that "A " is greater than "A" since

 

 

trailing spaces are significant.

+

30 LET Z$=R$+Q$

String concatenation. The resulting string

 

 

must be less than 256 characters in length

 

 

or an LS error will occur.

INPUT

40 INPUT X$

Reads a string from the keyboard. String

 

 

does not have to be quoted; but if not,

 

 

leading blanks will be ignored and the

 

 

string will be terminated on a "," or ":"

 

 

character.

READ

50 READ X$

Reads a string from DATA statements

 

 

within the program. Strings do not have

 

 

to be quoted; but if they are not, they

 

 

are terminated on a "," or ":" character

 

 

and leading spaces are ignored. See

 

 

DATA for the format of string data.

PRINT

60 PRINT X$

Prints the string expression on the

 

70 PRINT "FOO"+A$

display/printer.

300STATEMENT DEFINITIONS

301SPECIAL CHARACTERS

CHARACTER USE

--------- ---

@Erases current line being typed, and types a carriage return/line feed.

DEL

Erases last character typed. If no more characters are left on

 

the line, types a carriage return/line feed.

RETURN

A RETURN must end every line typed in. Returns cursor to

 

the first position (leftmost) on line, and prints the line if the

 

printer is on.

F1

Interrupts execution of a program or a list command. F1 has

 

effect when a statement finishes execution, or in the case of

 

interrupting a LIST command, when a complete line has

 

finished printing. In both cases a return is made to BASIC's

 

 

Page 232
Image 232
Apple II Additional String Considerations, Name Example PURPOSE/USE DIM, Input Input X$, Print Print X$, Print FOO+A$, Del

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.