B$="BASIC FOR"+" "+A$

PRINT B$

BASIC FOR ROCKWELL R6500

Concatenation is especially useful if you wish to take a string apart and then put it back together with slight modifications. For instance:

C$=LEFT$(B$,9)+"-"+MID$(B$,11,8)+"-"+RIGHT$(B$,5)

PRINT C$

BASIC FOR-ROCKWELL-R6500

VAL AND STRS FUNCTIONS

Sometimes it is desirable to convert a number to its string representation, and vice-versa. "VAL" and "STR$" perform these functions.

Try the following:

STRING$="567.8"

PRINT VAL(STRING$) 567.8 STRING$=STR$(3.1415)

PRINT STRINGS$,LEFT$(STRING$,5)

3.1415 3.14

"STR$" can be used to perform formatted I/O on numbers. You can convert a number to a string and then use LEFT$, RIGHT$, MID$ and concatenation to reformat the number as desired.

"STR$" can also be used to conveniently find out how many print columns a number will take. For example:

PRINT LEN(STR$(3.157)) 6

If you have an application in which a user is typing in a question such as "WHAT IS THE VOLUME OF A CYLINDER OF RADIUS 5.36 FEET, OF HEIGHT 5.1 FEET?" you can use "VAL" to

extract the numeric values 5.36 and 5.1 from the question.

CHR$ FUNCTION

CHR$ is a string function which returns a one character string which contains the alphanumeric equivalent of the argument, according so the conversion table in Appendix E. ASC takes the first character of a string and converts it to its ASCII decimal value.

One of the most common uses of CHR$ is to send a special character to a terminal.

100 DIM A$(15)

110 FOR I=1 TO 15

120 READ A$(I)

130 NEXT I

120 F=0:I=1

130 IF A$(I)<=A$(I+1) THEN 180

140T$=A$(I+1)

150A$(I+1)=A$(I)

160A$(I)=T$

170F=1

180I=I+1

185IF I<15 THEN 130

190IF F THEN 120

200FOR I=1 TO 15

202PRINT A$(I)

204NEXT I

220DATA AIM 65,DOG

230DATA CAT,R6500

240DATA ROCKWELL,RANDOM

250DATA SATURDAY,"***ANSWER***"

260DATA MICRO,FOO

270DATA COMPUTER,MED

280DATA NEWPORT BE-ACH,DALLAS,ANAHEIM

Page 231
Image 231
Apple II manual Print B$ Basic for Rockwell R6500, Print C$ Basic FOR-ROCKWELL-R6500 VAL and Strs Functions, CHR$ Function

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.