Classic Computer Magazine Archive HI-RES VOL. 1, NO. 3 / MARCH 1984 / PAGE 74

kidsandatari1.jpg

Kids and the Atari from Datamost introduces Atari Basic Programming to children
aged 10 to 14. Arranged in 33 Lessons, the book contains notes to the instructor
or parents, examples, assignments and review questions. This is the second in a series.


Instructor Notes 2

Buzz, Inverse, String Constants

This lesson opens with the CTRL 2 key sequence which makes the buzzer sound. We wish to make plenty of "bells and whistles" available to the student to increase program richness.

The idea of a "string constant," used in Lesson 1, is explained. The numbers appearing in a string, for example the "19," cannot be used directly in arithmetic.

The INVERSE command puts a little pizazz on the screen.

Although the ATARI can print in lower case letters, we will not do so in this book. There are several reasons: we need lower case to indicate special commands like "buzz, inverse, normal, clear" in PRINT commands. The lower case letters are so small that they are not very clear anyway. And it just adds an unnecessary complication. If the instructor wishes to include lower case typing, do so by giving extra explanations, especially emphasizing that "clear" in a PRINT line does not mean type the word "clear," etc.

Questions:

1. How do you do each of these things: Make the ATARI "buzz?" Erase the screen? Empty the memory?

2. What is a "string?"

3. What special key do you press to "enter" a line?

4. What is a command? Give some examples.

5. How could you print "FIRE" in inverse letters and make the computer buzz?

Lesson 2

Buzz, Inverse, String Constants

Enter:

NEW (remember: RETURN key)

Then clear the screen (remember: SHIFT CLEAR keys).

You are ready to start this lesson.

Sounding the Buzzer

The ATARI has a buzzer. Use two keys to make it sound.

Hold down the CTRL key. Then press the "2" key.

You hear a loud buzzing sound.

CTRL stands for "control." This key helps control things on the computer. CTRL 2 makes the buzzer sound.

Printing an Empty Line

Run this:

10 REM LINES
20 PRINT "HERE IS A LINE"
30 PRINT
40 PRINT "ONE LINE WAS SKIPPED"

Line 30 just prints a blank line.

String Constants

Look at these PRINT statements:

10 PRINT "JOE"
10 PRINT "#D47*%"
10 PRINT "19"
10 PRINT "3(right top corner symbol)1416 "
10 PRINT "I'M14"

Letters, numbers and punctuation marks are called "characters."

Even a blank space is a character.

Look at this:

10 PRINT " "

(Later we will have graphics characters too, and some special characters like "buzz" and "clear.") Characters in a row make a "string."

The letters are stretched out like beads on a string.

A string between quotation marks is called a "string constant."

It is a string because it is made of letters, numbers and punctuation marks in a row.

It is a constant because it stays the same.

It doesn't change as the program runs.

Inside Out Printing

There is a special key on the ATARI computer.

It looks like this:

kidsandatari2.gif

It is called "the ATARI key."

Press it. Type.

Now all the letters you type are in the "inverse" mode.

Press the ATARI key again. Type.

You are back to normal (non-inverse) letters.

Use inverse to make the stuff printed on the screen look more interesting.

Inverse and Normal In Print Commands

We have a special way of telling you to press the ATARI key.

We will say "inverse" or normal." It looks like this:

10 REM BLACK AND WHITE
20 PRINT "INVERSE WHITE NORMAL BLACK"

This means:

Type:

20 PRINT"

Press the ATARI key

Type:

WHITE

Press the ATARI key again

Type:

BLACK"

Press the RETURN key.

Run the program.

Capital Letters And Small Letters

The ATARI can print in small letters (the ones called "lower case").

But in this book, we will not use any lower case on the computer.

IMPORTANT! Whenever you see lower case writing inside the quotation marks of a PRINT command, it will have a special meaning.

20 PRINT INVERSE

is not

20 PRINT "INVERSE"

20 PRINT NORMAL

is not

20 PRINT "NORMAL"

We saw one special meaning above with the ATARI key. Here is another.

The ESC Key

Find the ESC key. It is in the upper left corner of the keyboard. ESC is short for ESCAPE.

This key helps us give special instructions like "clear" and "buzz" to the computer.

Whenever you see "clear" in a PRINT command, do this:

Press the ESC key once.

Then hold down the SHIFT key and press the CLEAR key. Got it?

Enter:

10 REM SPECIAL PRINT
20 PRINT "CLEAR"
30 PRINT "CLEAN SLATE"

Of course you do not see "clear" in line 20. You see a funny bent arrow instead.

Whenever you see "buzz" in a PRINT command, do this:

Press the ESC key once.

Then hold down the CTRL key and press the 2 key.

Add this:

40 PRINT "BUZZ"

Of course, you do not see "buzz" in line 40. You see a funny inverse bent arrow instead.

Run the program. It should clear the screen, print CLEAN SLATE, and sound the buzzer.

Assignment 2:

1. Write a program that prints your first, middle and last names. Make the first and middle names in normal letters, and the last name in inverse letters.

2. Now make the program clear the screen before writing anything.

3. Now make the buzzer sound before printing each name.