VTech PreComputer Prestige Course Manual

®
COURSE BOOK
CONTENTS
CHAPTER 1 INTRODUCTION ............................... 1
CHAPTER 2 GETTING STARTED.....................2-4
CHAPTER 4 ACTIVITIES AND FUNCTIONS .. 9-24
CHAPTER 5 WORD PROCESSING .............. 24-27
CHAPTER 6 BASIC ........................................28-83
CHAPTER 7 CALCULATOR........................... 84-86
CHAPTER 8 TIME LIMITS .................................. 87
CHAPTER 9 SCORING................................... 88-89
CHAPTER 10 HOW TO USE AN EXPANSION
CARTRIDGE ................................... 90
CHAPTER 11 CARE AND MAINTENANCE........ 91
92
CHAPTER 1 INTRODUCTION
Thank you for buying the PRECOMPUTER PRESTIGETM learning toy by VTECH®! We at VTECH® are committed to providing the best possible products to activate a child’s mind.
Should you have any questions or concerns, please call our Consumer Services Department at 1-800-521-2010 in the US, 01235-555545 in the UK or 1-800-267-7377 in Canada.
PRECOMPUTER PRESTIGETM is our top of the line learning toy featuring 240x100 full dot
matrix LCD screen and a standard sized computer style keyboard that gives the user the look and the feel of a real laptop computer. PRECOMPUTER PRESTIGETM offers 42 activities that include tenses, antonyms, synonyms, grammar, basic mathematics, advanced math­ematics, over 1000 trivia questions, logic games, a word processor, basic programming, a daily planner, a telephone directory, a built-in calculator and an 75,000 words spell checker. Get ready for hours of learning fun with the PRECOMPUTER PRESTIGETM learning unit.
LCD DISPLAY
VOLUME
LOCK BUTTON
CAPS LOCK
LED
SWITCH
LOCK
BUTTON
CONTRAST
SWITCH
TYPING
KEYBOARD
ON & OFF BUTTON
ACTIVITY SELECTOR
CARTRIDGE
DOOR
MOUSE
MOUSE
PAD
1
CHAPTER 2 GETTING STARTED
The PRECOMPUTER PRESTIGETM learning unit operates on 4 "C" size batteries or a 9V AC adapter.
BATTERY INSTALLATION
1. Make sure the unit is OFF.
2. Locate the battery cover on the back of the unit and open it.
3. Insert 4 "C" size batteries as illustrated. DO
NOT USE NiCd RECHARGEABLE BATTER­IES. (The use of alkaline batteries is recom-
mended for maximum performance.)
4. Replace the battery cover.
5. Turn the unit ON.
BATTERY NOTICE
Install batteries correctly observing the polarity (+,-) signs to avoid leakage.
Do not mix old and new batteries.
Do not use batteries of different types.
Remove exhausted or new batteries from equipment when you are not going to use it for a long time.
Do not dispose of batteries in fire.
Do not attempt to recharge ordinary batteries.
The supply terminals are not to be short-circuited.
NOTE : If the unit suddenly stops working, the sound seems weak or the LCD screen
fades, it may be a problem of low battery power. Please install a new set of batteries before using.
BACKUP BATTERY INSTALLATION
Make sure the unit is OFF.
Locate the backup battery cover on the back of the unit and open it.
Insert a CR2025 battery as illustrated.
Replace the battery cover.
•Turn the unit ON.
Remove the plastic strip from the backup battery. (During the first time installation only) To avoid damage to the unit from leaky batteries, replace the backup battery at least once
a year.
2
NOTE : While replacing the backup battery, the 4 "C" size batteries must be kept in the
unit or the unit must be connected to the 9V adapter while the adapter is plugged in. If not, you will lose all the information stored in the following activities:
•Test Trainer
•Word Processing
Basic
200 Year Calendar
Daily Planner
•Telephone Directory
In addition to these activities, players’ names and scores will also be lost.
AC ADAPTER CONNECTION
Use a standard 9V AC adapter.
1. Make sure the unit is OFF.
2. Locate the adapter jack on the-left of the unit.
3. Plug the adapter into the unit’s adapter jack.
4. Plug the adapter into a wall outlet.
5. Turn the unit ON.
NOTE : Do not leave the adapter plugged in for a long period of time if the unit is not
in use. If the unit suddenly stops working or the sound seems weak, it may be the result of the adapter connection. Turn the unit off and unplug the adapter from the unit for 15 seconds. Next plug the adapter back in and turn the unit on. If the problem persists it may be the result of the adapter’s wiring or the unit. Please call our Consumer Services Department at 1-800-521-2010 in US or 1-800-267-7377 in Canada or 01235-555545 in the UK.
In the U.S.A.:The VTECH® AC adaptor is perfectly suited to operate this product. Many
retailers carry the adaptor, however, if you are unable to find one locally, call our Consumer Services Department at 1-800-521-2010 or send $10.00 plus $5.00 for shipping and handling (Illinois residents please add 8.25% sales tax) to:
Adaptor c/o VTECH® Industries, LLC. 101 E. Palatine Road Wheeling, IL 60090-6500
In Canada: Please see the enclosed VTECH® adaptor offer coupon.
ON BUTTON & OFF BUTTON
Turn on your PRECOMPUTER PRESTIGETM learning unit by pressing the ON button located at the lower right-hand side of the viewing screen. A welcome animation will play and you can begin. Turn off the unit at any time by pressing the OFF button.
3
Automatic Shut Off
If there is no input into the PRECOMPUTER PRESTIGETM unit for about 8 minutes, the unit will automatically shut off to save power. If you want to turn the unit back on after an automatic shut off, you need to press the ON button again. We recommend that you turn the unit OFF when not in use. If you will not be using the PRECOMPUTER PRESTIGE
TM
unit for a long period of time, remove the batteries and unplug the adapter.
CONTRAST SWITCH
Depending on your lighting conditions, slide the Contrast Switch to the left or right to allow for better viewing.
VOLUME SWITCH
Adjust the volume by sliding the Volume Switch toward the right-hand side to increase the volume and toward the left-hand side to decrease the volume.
MOUSE CONNECTION
1. Make sure the unit is OFF.
2 Locate the mouse jack on the back of the unit.
3. Plug the mouse into the mouse jack.
4. Turn the unit ON.
5. The mouse will work best if it is kept on the mouse pad.
The mouse functions the same as a real computer mouse. Move the cursor on the screen by moving the mouse in the direction you would like the cursor to move. The Left mouse button functions as a select key and Enter key while the right mouse button functions as an Esc key.
Left mouse button
Right mouse button
®
This "ARROW" shows the unlocking direction. Lock by pushing to the opposite side of the "ARROW"
4
CHAPTER 3 THE KEYBOARD
The keyboard on PRECOMPUTER PRESTIGETM combines the operation of a standard computer keyboard with several other functions described below.
$ £
Enter
SPECIAL KEYS
Enter Key:
Press this key after typing or choosing an answer to confirm your selection.
Shift Key:
Press this key to type capital letters or the symbols shown on top of the number keys.
Esc Key:
Press this key to exit an activity. By repeatedly pressing the Esc key you can return to the main menu.
Enter
5
Caps Lock Key:
Press this key to make all typed letters appear in upper case. Press the key again to return to normal typing mode. When the Caps Lock function is activated the Caps Lock light will turn on.
Symbol key:
Press this key to show off the characters which is not on the keyboard. This only apply for some activities only.
Answer Key:
Press this key to see the correct answer to any question.
Left Player/Right Player Keys:
Press these keys in games with a 2-player mode. The first person to hit his or her appropriate left or right player button will get the opportunity to answer the question first.
Cursor Keys:
Press the key to move the cursor to the right.
Press the key to move the cursor to the left.
Press the key to move the cursor upward.
Press the key to move the cursor downward.
6
Help Key:
Press this key in the Key-In mode of Trivia activities when you need help and you will be given three multiple choice answers to choose from. In Grammer Quiz, press Help to give you three multiple choice answers for the wrong word to choose from. In Flash
Words, press Help to give you a hint on the first letter of the word. NOTE: Since the players are competing against each other in 2-player mode, the Help
key is not available.
Break Key:
Press the Shift and Break keys simultaneously when you want to interrupt a program in
BASIC while it is running.
Alt key:
Press this key and one of the assigned keys to activate the shortcut key function in Word Processing.
Repeat Key:
Press this key when you would like the unit to repeat a trivia question. This will be useful when you can’t see the whole question or a multiple choice window is blocking the question.
AC Key:
Press this key for an ‘All Clear’ screen in the Calculator activity.
Insert Key:
Press this key when you want to insert text during file or record editing in WORD PROCESSING, BASIC, DAILY PLANNER, TELEPHONE, TEST TRAINER or CALCULATOR.
Delete Key:
Press SHIFT and this key when you want to delete the character at the current cursor position.
7
Backspace Key:
Press shift and this key when you want to delete the character before the cursor position.
Cursor Point:
The cursor point is used to move the cursor arrow around. In order to select an icon, move the cursor point to the icon and press the left cursor button. Press the right cursor button in WORD SEARCH to switch between vertical and horizontal words. Press the right cursor button in WORD PUZZLE to close the clue window.
ACTIVITY SELECTOR
There are 42 activities in the PRECOMPUTER PRESTIGETM unit and they are divided into 5 activity groups. Press any one of the five activity group selectors to go into the corresponding activity group menu.
Player Key:
Press this key to change from 1-player mode to 2-player mode and vice versa for activities with 2-player mode only. If you want to change the player mode, press this key first and then select a player mode by typing the number or use the mouse to click one of the player icons.
8
Level Key:
The unit provides 4 levels of challenge in most of the activities. If you want to change the level, press this key first and then select a level by typing the number or use the mouse to click one of the level icons. There are 4 levels with the first level being the easiest and the fourth level being the most difficult.
Cartridge Key:
This key is used to access VTECH® PRECOMPUTER expansion cartridges that connect with the unit. It will not work unless an expansion cartridge has been inserted into the unit.
NOTE: Cartridges are sold separately.
CHAPTER 4 ACTIVITIES AND FUNCTIONS
HOW TO PLAY
SELECTING/CHOOSING/HIGHLIGHTING
During the course of entering the activities and during game play you will be asked to select, choose or highlight an object, a number, a letter or a word. This can be done in three different ways:
Mouse
You can move the cursor arrow with the mouse. When the cursor arrow is on the item you want to choose press either the left mouse button, the left cursor point button or the Enter button.
Cursor Point
You can move the cursor arrow with the cursor point. When the cursor arrow is on the item you want to choose press either the left mouse button, the left cursor point button or the Enter button.
Cursor Keys:
You can move the cursor arrow with the cursor keys. When the cursor arrow is on the item you want to choose press either the left mouse button, the left cursor point button or the Enter button.
9
ENTERING ACTIVITIES
After turning on the power, there is a welcoming animation and the main menu will appear.
Use 1 of the following 2 ways to enter into one of the five activity group menus:
1. Press any one of the five activity group buttons from the activity keyboard
2. Choose an activity icon on the screen
After choosing the Activity Group (Word Games, Mathematics, etc.), use 1 of the following 2 ways to select an activity:
1 Choose an activity on the screen. Due to the limitation of the screen, you will have
to scroll through the activity list by using the UP or DOWN arrow icons located on the right side of the screen. Or you can use the UP or DOWN arrow keys on the keyboard. Press the Enter key to enter the selected activity.
2 Press the number which is shown next to the activity you want to play and the activity
will be automatically highlighted. Press the Enter key to enter the selected activity.
During any of the activities, press the ESC button to quit the activity and return to the activity group menu.
Press the ESC button in any of the activity group menus to return to the main menu and select another activity group.
During any of the activities, choose the icon to return to the main menu.
10
PLAYER MODES:
The unit will automatically begin in 1-player mode at power up. To enter the 2-player mode, press the Player key first and then type a "2" or use the mouse to click one of the player icons.
Note: The following activities do not offer two-player mode:
All Logic Games activities All Business Basic activities
GENERAL DISPLAY
In most of the activities, you will see a display with status information, handy icons and a working window. The status information will include the player’s name, the number of lives remaining and the score for each player. In addition to that, it will also show the level and the time left in the game.
1-Player mode:
Player's Name Player's Score Level Help System Setup
Player's Life Main Menu
Timer Scores
2-Player mode:
Left Player's Name, Score and Life Right Player's Name, Score and Life
11
SYSTEM SETUP
System Setup is available in each activity. Press the icon to enter System Setup. Inside the System Setup, you are able to change the following items:
Set printer type
Expand icon on/off
Select input method
Date format
Name change
SET PRINTER TYPE
There are a number of printers which the PRECOMPUTER PRESTIGETM unit is compatible with. Set Printer Type allows you to select any one of the printers. The PRECOMPUTER
PRESTIGETM learning toy supports the following printers:
VTECH® VT-25
EPSON LQ-X70 EPSON 24 PIN EPSON 9 PIN EPSON STYLUS CANON BJ30 CANON BJ300/330 HP LASER IVL HP DESKJET
After setting up the printer type, you can print a document from Word Processing, a program in Basic or print a screen. Please refer to Word Processing and Basic for printing. When you want to print any screen, simply press Shift and keys.
NOTE : For information on how to order the VTECH® VT-25 Thermal Printer, please call
1-800-521-2010 in the US, 01235-555545 in the UK, or 1-800-267-7377 in Canada.
EPSON, CANON and HP are a registered trademarks of their respective companies
12
EXPAND ICON ON/OFF
The PRECOMPUTER PRESTIGETM learning unit offers you descriptions of different icons and functions. When the unit is turned on, the expand icon is OFF and you can go into the System Setup to enable this function. When expand icon is ON, a bubble containing the name of the icon will pop up when you move the cursor over the icon.
SELECT INPUT METHOD
When doing questions like addition or subtraction, different people have different methods for inputting their answers. Some prefer to input from left to right and some prefer from right to left. The unit lets you set the input direction in the way you prefer.
DATE FORMAT
The PRECOMPUTER PRESTIGETM learning toy is a product which is sold worldwide. Different places have different formats for writing the date. In order to accommodate this, the PRECOMPUTER PRESTIGETM learning unit lets you set the date format that you are comfortable with. There are two types of formats and they are American and British:
American : January 1, 1996 British : 1 January 1996
NAME CHANGE
The PRECOMPUTER PRESTIGETM unit lets you enter your name and another player’s name. You can select the icon in the System Setup and you can input your name(maximum of 8 characters). The default names are "L.Player" and "R.Player".
WORD GAMES
PLURALS
A singular form of a noun will appear on the screen. Type in the plural form of the given word and press the Enter key to confirm your answer.
ANTONYMS
The unit will display a word on the screen. Type in a word that has the opposite meaning. The underlines tell you how many letters are in the word. Press the Enter key to confirm your answer. If you don’t know the answer, you can get help by pressing the Help key or clicking Help icon and a table of letters will display. The missing letters of the answer are located in the table.
13
SYNONYMS
The unit will display a word on the screen. Type in a word that has the same meaning. The underlines tell you how many letters are in the word. Press the Enter key to confirm your answer. If you don’t know the answer, you can get help by pressing the Help key or clicking Help icon and a table of letters will display. The missing letters of the answer are located in the table.
CORRECT THE WORD
The meaning of a word is given along with the mis-spelling of the word. Type in the correct spelling of the word and press the Enter key to confirm your answer.
FLASH WORDS
This activity challenges your memory skills. You will see 1 to 4 word(s) (depending on the level) appear on the screen. You are given 5 seconds to memorize the spelling and sequence of the word(s). Type in the word(s), in the same order you saw them and press the Enter key to confirm your answer.
TENSES
Using your knowledge of verb forms, provide the present tense, past tense, or past participle. Two forms of a verb will appear on the screen. Type in the missing form of that verb and press the Enter key to confirm your answer.
GRAMMAR QUIZ
A sentence will appear on the screen with one grammatical error. Choose the incorrect word. Then press the Enter key or left cursor/mouse button to confirm your choice. If you don't know the answer, you can get help by pressing the Help key or clicking on the Help icon and it will show you the grammatical error with 3 multiple choice options. If you correctly pick out the grammatical error, 3 multiple choice options will appear on the screen. Decide which option would make the sentence grammatically correct and press its corresponding number.
SCRAMBLERS
A group of words will appear on the viewing screen. You must rearrange the words to form a correct sentence. Select the word you think is the first word of the sentence and then press Enter or the left mouse/cursor button. Repeat the same process for the second word, third word and so on until the whole sentence is constructed. If you make a mistake, you can use the Backspace key or click the icon to undo the last pick. When you completed the sentence, press the Enter key or click the icon to confirm your answer.
14
WORD PUZZLE
This is a crossword puzzle game with 10 missing words in each puzzle. Use the cursor point to select one of the missing words and receive a clue for the word. Type in the word and press Enter to confirm your answer. If you do not want to answer this clue, choose another word. You can also press the right cursor button or press ESC key to close the clue window.
WORD SEARCH
In this activity, you need to find 10 hidden words in the puzzle. The words are oriented horizontally and vertically. You can use the and keys to move the flashing bar to find a word and press the Enter key to confirm the word. You can also move the cursor point or the mouse and the flashing bar will follow. Choose the first character to confirm the word. By default, the flashing bar is oriented horizontally and you can press the right cursor point button, the right mouse button or the Flip Icon to get a vertical flashing bar. The number of words found and the number of words remaining are indicated on the right hand side.
NOTE: The length of a word is indicated by the length of the flashing bar.
TEST TRAINER
Test Trainer allows you to input information and have the unit test you on it. This will be helpful if you are trying to learn a list of foreign language words or even chemical symbols. Since you can input any information you want, the uses are unlimited.
When you start the activity you will be given two choices: Input Data or Knowledge Challenge .
INPUT DATA
When entering this activity you will first be asked to "Input the original word or phrase." Type in the first part of the word or phrase that you want to be tested on. Then press Enter. For example you could input "Hello". The unit will then ask you to "Input the corresponding word or phrase." Type in the second part of the word or phrase that you want to be tested on. Then press Enter. For example you could input "Hola" as the corresponding phrase to "Hello."
You have now inputted the first set of data. The unit will display the original screen and ask you to "Input the original word or phrase." for the second set of data. Continue this process until you have entered the entire list.
15
EDITING DATA
Adding Records
Choose the icon when you want to add another set of data to your existing list. The record will be added at the end of the list.
Deleting Records
Choose the icon when you want to delete records from your existing list. Before you choose this icon be sure that you are on the correct record as you will not be able to retrieve the information once it has been deleted.
Finding Records
Choose the icon when you want to find a record to review, delete or edit. The unit will only search for the words or phrases which have been set-up as original words or phrases. Choose the icon and type in the word or phrase you want to find. Then press Enter. If the unit locates the record it will display it on the screen. If the record cannot be found the first record of the list will display.
Editing Records
Choose the icon when you want to edit a record. Find the record you want to edit and then choose the icon. Choose the word you want to edit. When you are done editing, press the Enter key to confirm.
KNOWLEDGE CHALLENGE
In Knowledge Challenge the unit will test you on the information you inputted. When entering this activity, you will be given the option to test yourself on either the original word/phrase list or the corresponding word/phrase list. After the unit displays the word/phrase, type in the correct answer and press Enter to confirm.
MATHEMATICS
ADDITION
An addition problem will appear on the viewing screen. Type in the answer using the number keys on the keyboard and press Enter key to confirm your answer.
16
You can also use the cursor point or the mouse to select the icon to get an on­screen number keyboard. Input the answer by choosing the numbers on the keyboard and select the icon to confirm your answer.
SUBTRACTION
A subtraction problem will appear on the screen. Type in the answer using the number keys on the keyboard and press Enter.
You can also use the cursor point or the mouse to select the icon to get an on­screen number keyboard. Input the answer by choosing the numbers on the keyboard and select the icon to confirm your answer.
MULTIPLICATION
A multiplication problem will appear on the screen. For Level 1 type in the answer using the number keys on the keyboard and press Enter.
For Levels 2, 3 and 4 you must complete each line of the problem correctly before moving on to the next line. To do this, enter your answer for the first line of the problem and press Enter to confirm. The unit will automatically take you to the next line. Continue to enter your answers until the entire problem is completed.
You can also use the cursor point or the mouse to select the icon to get an on­screen number keyboard. Input the answer by choosing the numbers on the keyboard and select the icon to confirm your answer.
DIVISION
A division problem will appear on the screen. Type in your answer using the number keys on the keyboard and press Enter to confirm. Be sure to pay close attention to the position of the cursor as it sometimes moves to another line automatically. When the problem is completely filled, press the Enter key to confirm your answer.
You can also use the cursor point or the mouse to select the icon to get an on­screen number keyboard. Input the answer by choosing the numbers on the keyboard and select the icon to confirm your answer.
17
RATIOS
A ratio problem will appear on the screen. Type in the answer using the number keys on the keyboard and press Enter.
You can also use the cursor point or the mouse to select the icon to get an on­screen number keyboard. Input the answer by choosing the numbers on the keyboard and select the icon to confirm your answer.
ALGEBRA
An algebra problem will appear on the screen. Type in the answer using the number keys on the keyboard and press Enter.
You can also use the cursor point or the mouse to select the icon to get an on­screen number keyboard. Input the answer by choosing the numbers on the keyboard and select the icon to confirm your answer.
DECIMALS
An equation which involves a fraction and a decimal will appear on the screen. Type in the answer using the number keys on the keyboard and press Enter.
You can also use the cursor point or the mouse to select the icon to get an on­screen number keyboard. Input the answer by choosing the numbers on the keyboard and select the icon to confirm your answer.
PERCENTAGES
An equation which involves a fraction and a percentage will appear on the screen. Type in the answer using the number keys on the keyboard and press Enter.
You can also use the cursor point or the mouse to select the icon to get an on­screen number keyboard. Input the answer by choosing the numbers on the keyboard and select the icon to confirm your answer.
STORY PROBLEMS
In this activity the PRECOMPUTER PRESTIGETM learning unit challenges you to find answers to math problems that are presented as story problems instead of numerical equations. The question will appear on the viewing screen and then 3 multiple choice options will be given. Decide which option is the correct answer and press its corresponding number. To see the complete question, press the Repeat button.
EQUATION MAKER
An equation in random order will appear on the viewing screen. You must rearrange the numbers and signs to form a correct equation. Select the number or sign you think is
18
first in the equation and then press Enter. Repeat the same process for the second, third and so on until it forms an equation. If you make a mistake, you can use the Backspace key or click the icon to undo the last pick. When you have completed the equation, press the Enter key or click the icon to confirm your answer.
TRIVIA GAMES
This challenging trivia games has over 1000 questions in 6 different topics: Health and Safety, Inventors and Inventions, Science, History, Geography and Diverse Dates. All topics are available with 2-player mode and 4 levels.
Once you select a topic, you have a choice between Multiple Choice or key-in the answer. Multiple Choice Three multiple choice options are given to you. Select the correct
answer.
Key-in the answer You are required to type in the correct answer. If you need help
in 1-player mode, press the Help key or click the icon to display the multiple choice options. Using the Help will result in losing one chance.
DIVERSE DATES
When you select Diverse Dates, you can choose between Reference Mode or Knowledge Challenge Mode .
REFERENCE MODE
The Reference Mode will give you a historical event which happened on the date you choose. The activity will start with showing you a calendar of January, 1996. You can change the day by clicking on the arrows on the right or left of the icon. You can change the month by clicking on the arrows on the right or left of the icon. You can change the year by clicking on the arrows on the right or left of the icon.
The icon will give you the historical event and the date when it happened.
KNOWLEDGE CHALLENGE MODE
The Knowledge Challenge Mode will test the user’s knowledge on different historical events. The Knowledge Challenge plays in the same way as the other trivia games.
19
LOGIC GAMES
THE GREAT ESCAPE
Help BLOCK to get free! Move the blocks so that BLOCK gets out through the exit within the time limit. To move a block, select the block you want to move. Then use the mouse or the cursor point to move the block to the space you want. Press the left mouse/cursor point button or the Enter to unselect the block. You can now select the next block you want to move.
PATH FINDER
The object of this game is to construct a path from the Starting Point Icon to the Victory Icon using the tiles. You can construct the path by swapping 2 tiles at a time. If you want to swap tiles, select the first tile you want to swap and then click on the second tile. The two tiles will trade places. When the path is completed, press the ENTER button to confrim or select the icon.
DISC CHALLENGE
The goal of this game is to move all the discs from one pole to another. You can only move one disc at a time and you cannot put a larger disc on top of a smaller disc.
Select the disc you want to move and then click on the pole where you want to place the disc. Repeat this process until all the discs have reached the target pole. When you are done, press Enter to confirm or select the icon.
20
STEP BY STEP 1
This activity introduces the simple concept of programming. Your goal is to recreate the picture on the screen by controlling and moving the drawing ball.
When the game starts, decide whether you want to move or draw first. Click the icon to get the move commands and click the icon to get the draw commands. When you want to move right, click on the . Repeat the process until you think you have given the correct commands to redraw the pre-defined picture and press the icon to confirm. The unit will follow your program and if it draws the pre-defined picture, you win.
STEP BY STEP 2
This is a free drawing or practice session of Step By Step 1. You are allowed to draw whatever you like on the drawing board.
SECRET SEQUENCES
The goal of this game is to guess the Secret Sequence. The number of patterns you need to complete the sequence is indicated by the number of underlines. A pattern selection menu is located on the right. Choose a pattern and it will appear on the left hand side. After filling in all the underlines press the icon to confirm your guess. After each guess, you will be given hints. There are three types of hints, means the pattern is correct and in the correct place, means the pattern is correct but not in the correct place and means the pattern does not exist in the sequence. The positions of the hints DO NOT correspond with the positions of the tiles. With the help of these hints, you can continue to make your guesses.
21
BUSINESS BASICS
WORD PROCESSING
This activity offers a word processor for many types of documents. See Chapter 5 of this manual.
TYPING GAME
This activity helps to improve your keyboarding skills through this exciting typing game. The game will drop words from the top of the screen. The objective of this game is to type these words before they hit the bottom of the screen. When a word hits the bottom of the screen, you lose one of the three chances.
Type in the words that appear and press the Space Bar or the Enter to confirm. You will receive a score for each word that you enter correctly.
BASIC TUTOR
This activity will acquaint you with the fundamental BASIC commands through a series of simple practice programs. These programs have already been entered into the
PRECOMPUTER PRESTIGETM unit so you do not need to do any extra typing. However,
you can alter the programs after they are loaded to experiment with the language. Don’t worry about messing up the programs! The original version will always be available to start over again. These simple practice programs are listed in the APPENDIX of Chapter 6 of this manual.
BASIC
This is an intensive programming activity. Full instructions are provided in Chapter 6 of this manual.
200 YEAR CALENDAR
The PRECOMPUTER PRESTIGETM learning toy has a built-in 200 year calendar. The activity will start by showing you the calendar January, 1996. You can change the day by clicking on the arrows on the right or left of the icon. You can change the month by clicking on the arrows on the right or left of the icon. You can change the year by clicking on the arrows on the right or left of the icon.
You can also mark important holiday or celebration dates. Choose the date you want to mark and then choose the icon. You will see a black box on the date. You can remove the mark by choosing the date and then selecting the icon.
DAILY PLANNER
The Daily Planner lets you record important notes, dates, appointments, etc. so that you can reference them later. The first time you enter the activity you will have to choose
22
the icon to begin entering data. It is usually a good idea to have some type of header on each record. For example you could put lunch (for a lunch appointment), birthday (to remind you of an upcoming birthday) and so on. This will make it easier to find the records in the future.
Adding Records
Choose the icon when you want to add another record. The record will be added at the end of the list.
Deleting Records
Choose the icon when you want to delete records. You will be asked to confirm the deletion.
Finding Records
Choose the icon when you want to find a record. The unit will search for the first record with the words or phrases you are looking for. Choose the icon and type in the word or phrase you want to find. Then press Enter. If the unit locates the record it will display it on the screen. If the record cannot be found the current record will display.
Editing Records
Choose the icon when you want to edit a record. Find the record you want to edit and then choose the icon. Edit the record as you would in a word processing document.
TELEPHONE DIRECTORY
The PRECOMPUTER PRESTIGETM learning toy comes with a built-in Telephone and Address Directory. You can enter the names, phone numbers and addresses of your friends and family. You can also give each person his/her own face.
Adding Records
Choose the icon when you want to add another record. The unit will first ask you to input the name. Press Enter when you are done entering the name. Then the unit will ask you to enter the phone number. Press Enter when you are done entering the phone number. Then the unit will ask you to enter the address.
Deleting Records
Choose the icon when you want to delete records. You will be asked to confirm the deletion.
Finding Records
Choose the icon when you want to find a record. The unit will search for the first record with the words or phrases you are looking for. Choose the icon and type in the word or phrase you want to find. Then press Enter. If the unit locates the record it will display it on the screen. If the record cannot be found the first record will display.
Editing Records
Choose the icon when you want to edit a record. Find the record you want to edit and then choose the icon. Edit the record as you would in a word processing document.
23
CALCULATOR
This activity allows you to use the unit as an advanced, scientific calculator. See Chapter 7 of this manual for instructions.
SPELL CHECKER
Spell Checker is an electronic word list that contains 75,000 words and is used to check the correct spelling of words. This program can work independently or within the Word Processing activity.
The Spell Checker searches words phonetically. English words can be difficult to spell because the same sound can sometimes be spelled several different ways. Remember, Spell Checker never actually spells a word for you but will check your spelling and give you a list of possible words to choose from.
Type a word you want to check and press Enter to confirm. PRECOMPUTER PRESTIGE will spend a few seconds checking the dictionary. If the word is spelled correctly,
PRECOMPUTER PRESTIGETM will respond with "Correct!". If the word is not in the
dictionary, it will respond with "Cannot find the word!". You can click the icon to get suggestions with a list of possible words.
TM
CHAPTER 5 WORD PROCESSING
The PRECOMPUTER PRESTIGETM offers you one of the first and most important applications found in computers: word processing. With this word processor you will be able to create, edit, save and print any document you can create. You are only limited by your imagination.
The Word Processing activity has 3 pull-down menu icons ( , , ) along the top of the screen. They will give you a clear understanding of the primary functions of the Word Processing activity.
FILE
Load load a file from the optional RAM cartridge* New clear the current file from the screen Save save the file on to the optional RAM cartridge* Delete delete a file from the optional RAM cartridge* Print print the current file * command is only available when RAM cartridge is inserted.
Note : For information on how to order the optional RAM cartridge, please see Chapter 10.
24
LOAD
Load is the command used to retrieve an existing file from the optional RAM cartridge. Select Load from the FILE menu icon and it will list all the files in the RAM cartridge. Select the file you want to retrieve and press Enter. The chosen file will then appear on the screen.
NEW
Every time you enter the word processing, you will see the same file you worked on the last time you were in Word Processing. New is the command to create a new file. Select New from the FILE menu icon and it will ask whether you want to save the current file. If you type “y”, it will clear the memory; any other keys will return to the document.
SAVE
Saving files is a very important option in Word Processing because if you forget to save the file, you will never get a chance to retrieve the file and continue to work on it. In order to save a file, select Save from the FILE menu icon and it will prompt you with the filename. Press Enter to save the file or revise the name and save the file with a different name before pressing Enter to confirm. Please note that the filename can only be up to 11 characters long.
DELETE
When you no longer need a file, erasing it from the optional RAM cartridge is a good idea because it will free up more space for other files. Select Delete from the FILE menu icon and it will prompt you with a list of files in the optional RAM cartridge. Select the file to delete and press Enter to confirm. A message will ask you for confirmation. Be careful when deleting files because whatever is deleted will be gone forever.
PRINT
In order to use the print feature, you must connect it to one of the printers which works with the PRECOMPUTER PRESTIGETM. Please see the list of compatible printers listed in the SET PRINTER TYPE section in Chapter 4. It is wise to save your file before printing. Select Print from the FILE menu icon and it will print the file.
25
EDIT
Cut cut a block of text Copy copy a block of text Paste paste a block of text Clear erase a block of text
Most simple editing can be accomplished by using the insertion and deletion keys. When you want to change larger blocks of text, then you need to do block editing. The EDIT pull-down menu is for editing blocks of text.
DEFINE A BLOCK
The first step in block editing is to define or mark a block of text. To define a block, place the cursor at the first character of the block you want to edit, then continue to press the left mouse button and drag the cursor over the text you want to edit. When the cursor is at the end of the block release the left mouse button. After a block of text is defined, then you can use one of the four block editing tools, cut block, copy block, paste block or clear block.
CUT BLOCK
To cut a block of text, first define the block of text and select Cut from the EDIT menu. The block will be removed from its current position and will be placed in memory. You can now paste the block in any location in the document.
COPY BLOCK
After a block of text has been defined, select Copy from the EDIT menu. The original block will remain and you can paste the block in any location in the document.
PASTE BLOCK
After you have used the Cut or Copy option, move the cursor to the position where you want the block of text to be pasted. Select Paste from the EDIT menu and the block of text you defined will be pasted to the new location.
CLEAR BLOCK
To erase a block of text, first define the block of text and select Clear from the EDIT menu icon to clear the block. Be careful, because the defined block will be permanently cleared from the document.
26
TOOLS
Spelling spell check of a word Symbol insert symbols
SPELLING
Spelling checks a word to see if it is in the spelling dictionary in the Spell Checker activity. To check the spelling of a word, move the cursor to the beginning of the word and select Spelling from the TOOLS menu icon. If the word exist in the dictionary, it will show "Correct!". If the word does not exists in the dictionary, it will give you a list of possible words for reference. Press any key to escape from the list of words.
SYMBOL
Symbol gives you a list of useful characters which you can use in your documents. Select Symbol from the TOOLS menu icon to get a list of characters and symbols for input. Press
and keys to locate a symbol and press Enter to confirm. Click the
ESC icon on the symbol’s pop up window to close the window.
SHORTCUT KEYS
In order to provide a better user interface, shortcut keys are introduced in Word Processing. The shortcut keys are used to access a function quickly without moving the mouse around to locate the function. Functions and their corresponding shortcut keys are listed below:
To access a Function you must first access the pull-down menu. For example: to use shortcut keys to Print, you must press Alt-F then press Alt-P.
Pull-down Menu Function Shortcut Keys
File Alt-F
Load Alt-L
New Alt-N
Save Alt-S
Delete Alt-D
Print Alt-P
Edit Alt-E
cUt Alt-U
Copy Alt-C Paste Alt-P cLear Alt-L
Tools Alt-T
Spelling Alt-S
symBol Alt-B
27
CHAPTER 6 BASIC
INTRODUCTION
ARE COMPUTERS IMPORTANT?
Computers are all around us. Like cars, phones and TVs, computers help us make our lives easier. Millions of computers are used everyday. Doctors use computers to treat patients. Police use computers to track criminals. Stores use computers to add up prices quickly and so on.
WHAT ARE COMPUTERS?
A computer is a tool that helps us to do things better and faster. They work without getting tired. They operate at very high speeds. They follow instructions perfectly. And they never forget, like we sometimes do.
The electronic computer has been around now since the late 1940’s. The first ones were huge electronic mazes of wires and tubes. They were so expensive so that only big businesses and governments could afford to buy them and keep them running. The early computers required large amounts of electrical energy to run them and generated vast quantities of heat. More importantly they required a specialized team of experts called programmers to tell them what to do.
This is a far cry from how we see a computer today. We see them mostly as watches, calculators, microwave ovens, VCR’s, phones, TV’s, CD’s, and personal computers. This is a little different from the computers used in businesses which are larger and require more space to operate.
People today generally work with a very small version of a computer called a microcomputer. A microcomputer is a computing device where the central processor and memory(RAM) are contained on a very small integrated circuit "chip" called a microprocessor. The central processor is the device that performs arithmetic and makes decisions. The memory is where information in the form of numbers and letters are stored. A microcomputer therefore contains both a microprocessor and ways to communicate with the person using it.
All microcomputers have a keyboard for you to type in your instructions. This is called "input". Some have individual keyboards, like a typewriter; others have plastic membranes, like microwave ovens.
All microcomputers have a device which is used to communicate back to a person. This is called "output". Some microcomputers use your TV set, while others require a special type of display called a "monitor". Some use paper in a device called a "printer" and some use a liquid crystal display(LCD) which is the same display that is used on some clocks and watches.
WHAT IS BASIC?
BASIC is a computer language. The name BASIC stands for Beginner’s All-purpose Symbolic Instruction Code. It was developed by professors at Dartmouth College in the mid-1960s. It was designed for students who had no previous experience in programming computers.
28
BASIC is basic; however there are differences in the language based on the computer that uses it in much the same way that English is different depending on which country it is spoken in(Great Britain or the United States) or which part of the country the language is spoken in(East Coast, Midwest, South or the West Coast).
The differences in the language will depend on the computer that is being used and on the computer that produced the language for the computer manufacturer. Microsoft BASIC, so-called because it was developed by the Microsoft Corporation of Belleview, Washington, is found on Apple II+, IBM PC and PC jr., Laser Computers, Commodore VIC20 and Commodore 64 and others. Other computers such as the Timex Sinclair ZX80 and the Texas Instruments 99/4 use versions of BASIC similar to MS-BASIC.
WHAT IS A PROGRAM?
A computer program is a series of instructions that tells a computer what tasks you want it to perform. Computer programs are written in a programming language. BASIC is one of the languages that a human and a computer can understand, so BASIC can be used to write a program that a computer can carry out for you.
WHY SHOULD I LEARN TO USE A COMPUTER?
Computers are going to be part of the future. Computers can do many things if they are given instructions. For a particular job to be done, by a person or a machine, we must specify the steps which must be done to do the job. The computer becomes an extension of our capabilities. To do this requires us to learn how to talk to our computer.
This chapter will help you to get started. All you need is your PRECOMPUTER PRESTIGE learning unit and some time.
TM
WHAT IS THIS CHAPTER FOR?
This chapter is a step-by-step guide for understanding programs and learning to use the computer language called BASIC.
WHO IS THIS CHAPTER FOR?
This guide is written for students and adults who have little or no programming experience. With a little time and effort you will discover that there is nothing difficult about learning to talk to a computer.
WHAT IF I MAKE A MISTAKE?
Don’t worry about making a mistake. The more mistakes you make the more you will learn. This is called discovery! The computer doesn’t care how many mistakes you make. There is nothing you can do to damage the computer - except smashing it. Experimenting is a very good way to make your programs do exactly what you want.
29
THE KEYBOARD
1. The numeric(top row) keys are used for entering numbers. The letter keys are used for entering letters.
2. The cursor is the blinking block symbol on the display that indicates where the next character that is pressed on the keyboard will be entered in the computer.
3. The Shift key is used with another key to enter a character into the computer. For example to enter the "+" character, you must press Shift and the key marked "+ =". If you just press the "+ =" key then the "=" character will be entered.
4. The key and the key are used to position the cursor left or right, respectively. They do not erase any character that is displayed, but you can type over anything in their positions.
5. To enter a space, simply press the Space bar. Each time you press the Space bar, one space is inserted on the display line.
6. The Ins and Del keys are used to insert or delete one character at a time on the display where the cursor is positioned.
When the Ins key is pressed once, it will be in insert mode. The cursor will appear as a rectangle. All characters to the right of the cursor position will be shifted one character to the right to make room for the new character once it is inputted through the keyboard. Pressing the Ins key again will return to the overwrite mode. The cursor will now appear as a line. New characters will overwrite the characters to the right.
The Del key is used to delete one character at a time. The Del key will shift all characters to the right of the cursor one position to the left, thereby erasing the character under the cursor.
7. Before anything on the display is actually sent, you must press the Enter key. This key acts much like a Return key on a typewriter. You press all the keys that comprise a statement to the PRECOMPUTER PRESTIGETM learning unit and then press Enter.
PRECOMPUTER PRESTIGETM will take it from there.
8. Every time BASIC is selected, it is in the overwrite mode. That is, the characters you type will replace any characters already on the screen, unless you use the Ins key.
9. The "^" character in the key (which is used only in the BASIC program) is used to tell the computer you want to raise the number preceding it to a power of the number
following it. More on arithmetic later.
10. The Break key is used as a Break which means it can do one or two things. When you are typing a line, but before you press Enter, it will erase all that you have typed; or, if you are running a BASIC program, you can interrupt it by pressing the Shift and Break keys simultaneously. You can restart a program by typing CONT and pressing the Enter key.
When using the INPUT command, PRECOMPUTER PRESTIGETM will ask you to supply it with some data from the keyboard. PRECOMPUTER PRESTIGE input with a prompt. The prompt is the "?" symbol and it appears on the display indicating that the computer is waiting for you to type something. The letters and numbers that you press appear on the display.
TM
tells you it needs
30
THE DISPLAY
The PRECOMPUTER PRESTIGETM learning unit uses a Liquid Crystal Display (LCD). Although it is a relatively large viewing screen, you can’t see the whole program at one
time. Use the and keys to scroll through display window.
GETTING STARTED
This activity lets you type in your own programs and run them. Follow these simple steps:
1. Turn on the PRECOMPUTER PRESTIGETM unit.
2. Click the Business Basic icon from the main menu.
3. Choose the BASIC activity.
There are two modes available — Command and Run.
Type in this program:
10 PRINT "HI THERE" press the Enter key
This is the usual way to write a program. Each line starts with a number and is followed by a statement. Type in the program lines and remember to press the Enter key. The
PRECOMPUTER PRESTIGETM unit stores the line with the other lines into memory. Later you can execute the program by typing the command, RUN. Don’t forget to press the Enter key after typing RUN. The program that you have typed into memory will begin. The
results appearing on the LCD display will be the message: HI THERE. There is a short cut.
Enter the following (no line number in front):
PRINT "HI THERE" press the Enter key
This time PRINT was used as a command and the results appeared immediately on the display after the Enter key was pressed. The computer executes the command right away, without waiting for you to type RUN. When you do this, the statements are not saved for future re-use. They are executed immediately and discarded. This is not recommended for creating programs but highly recommended for use as a calculator.
Here are some other commands that can be used:
NEW
This command clears the memory of any BASIC statements that have been previously entered.
31
LIST
This command displays each line of your program starting with the lowest line number. Each time you press Enter, the next lines are displayed. You can stop this by pressing the Shift and Break keys. If you enter the command with a line number after the word, i.e., LIST 50, PRECOMPUTER PRESTIGETM will list the statement at line 50.
RUN
This command instructs PRECOMPUTER PRESTIGETM to begin executing each BASIC statement with a line number that was typed into memory. The computer will start with the lowest line number and proceed up to the highest numbered statement.
EDIT
Use the EDIT command when you want to change a statement that has been typed into memory without re-typing the entire line. Just type EDIT and the line number and press the Enter key. The statement will appear on the display. Use the and keys to move the cursor. Use the Del key to remove an unwanted character, or type in a new character.
You can type in line-numbered BASIC statements in any order. The PRECOMPUTER
PRESTIGETM will sort them out for you and LIST them or RUN starting with the lowest
numbered statement to the highest numbered statement. It is a good idea to number your lines in increments of 10 (10, 20, 30...) or 100 (100, 200, 300...). This way you will have room to add more statements if you decide to change your program in the future.
You can insert an entirely new line in a program by using a line number that doesn’t exist between two existing ones. You can delete an existing line-numbered statement by merely typing the line number and pressing the Enter key. Of course, you can change an existing line by merely re-typing the entire line.
AUTO
When you want to type in the program, you need to type in the line number before the statement. With the AUTO function, the line number will generate automatically.
e.g. AUTO generate the line no. starting from 10 with increments of 10
AUTO 100 generate the line no. starting from 100 with increments of 10
AUTO 100, 5 generate the line no. starting from 100 with increments of 5
i.e. 100
105
"
"
To end the AUTO mode, press Enter without input or press the Shift key and the Break key at the same time.
32
CONT
This command causes the program to resume executing after encountering the BASIC command called STOP. The program will be carried on with the next statement after STOP. You can type CONT to resume the program after you hit the Shift and Break keys.
BASIC COMPUTER TUTORIAL
1. A REAL SMALL PROGRAM
You and Teresa went to the local video store to rent some movies. Teresa brought back 12 but 4 were too gory for you and so you took them back. On that trip you got carried away and came home with 7 new ones. How many are you going to watch this afternoon? You could work this out yourself but here is a small BASIC program that can do the arithmetic for you.
Type in:
10 PRINT 12-4+7 and press Enter
20 END and press Enter
Not much to it. Now type RUN and press Enter. What happens? The answer, 15, appears on the display.
In BASIC, you write a series of line-numbered statements that tell the PRECOMPUTER
PRESTIGETM unit what to do. The first statement, numbered 10, tells the computer to work
out the sum of three numbers and then PRINT the answer in the display. The next statement, number 20, tells the computer that this is the end of the program and that it can stop RUNNING. However, the last statement is not necessary in this program because you only want to print out the sum of 3 numbers, therefore, it could be removed.
Remove that last line by typing 20 and press Enter, then type RUN and press Enter. What happens? That’s right, you get the same result.
Suppose you typed:
10 PRONG 12-4+7 and press Enter
Now type RUN and press Enter. What happens? You get the strange message, "? SYNTAX ERROR IN 10" in the display. That means you made a mistake in BASIC grammar and
this is the PRECOMPUTER PRESTIGETM unit’s way of telling you this. You need to EDIT the line or re-type it, changing "PRONG" to "PRINT" and then running the program again to get the correct answer.
33
You can use PRECOMPUTER PRESTIGETM as a calculator in arithmetic statements like the one above by not using a line number.
Just type:
PRINT 12-4+7 and press Enter
The answer will appear on the display. Another short cut is that you could use the "?" symbol to stand for the word "PRINT".
When you are using BASIC as a calculator in "command mode", think of the question mark as meaning "What is 12-4+7?" and when you are using the question mark as a "PRINT" command in a program, the computer will replace the "?" with the word "PRINT" for you.
2. LET’S DO SOME ARITHMETIC
In the previous section you did a sum of three numbers. The numbers like 1, 3, 27, 14.3, etc., are called CONSTANTS. The program added and subtracted the constants 12, 4 and
7. The order that you do addition is unimportant: 6+10 is the same as 10+6. In subtraction,
the order is important: 10-6 is not the same as 6-10. So the order that you write numbers and do arithmetic operations is important. In BASIC, operations are from left to right.
The * symbol is used to represent multiplication. Like addition, the order of the numbers is unimportant. Here’s an example. There are 2.204 pounds to a kilogram. How many pounds does a 6 kilogram parakeet weigh?
Try this:
10 PRINT 6*2.204
The symbol / is used for division. Here, like in subtraction, the order of the numbers is important since 15/3 is 5 and 3/15 is .2. How many kilograms does a 6 pounds parakeet weigh?
Try this:
10 PRINT 6/2.204
You can raise a number to a power also. To do this you need the ^ sign. The expression 5^3 means 5*5*5 or 125; similarly, 3^5 means 3*3*3*3*3 or 243. There are fractional
powers; for example 2^.5 is the square root of 2 or 1.414.... Here’s an example: I bet
you 1 doubloon and throw the dice 10 times; each time you double your money. How much have you won?
34
Type:
10 PRINT 2^10
When you use all the operations together, it can get a bit complicated. After a winning baseball game, your 7-person team is awarded 3 cans of pop for the game plus another 11 cans because you finished first in the league too. How many cans does each player get?
Type this:
10 PRINT 3+11/7
Is it really evaluated from left to right? Yes, but was it the answer you were expecting? If the answer came out to 4.57143, the computer first divided 11 by 7 getting 1.57143 and then it added 3 to the result giving 4.57143. You probably were expecting the answer to be 2 because 3+11 is 14, then divided by 7 is 2.
You can see that expressions are not simply evaluated from left to right. It is necessary to have an exact set of rules to follow.
Here they are:
Functions Order in which they are
performed () things is parentheses(brackets) 1st ^ raising to a power 2nd * / multiplication and division 3rd + - addition and subtraction 4th
The computer will always look at an expression in parentheses first and do the things you put there. It could be an expression or more sets of brackets. Among the expression, raising to a power is done first, followed by multiplication and division from left to right, followed by addition and subtraction from left to right. If you’re not sure how the computer will evaluate the expression, simply put brackets around the expression you want done first. Remember the brackets must always be in pairs, one right bracket for each left one. If you don’t, then you will get a "? SYNTAX ERROR" message.
35
3. NUMERIC VARIABLES
You have seen how you can use BASIC to print numbers and messages. You can also give values to a BASIC program yourself. The computer uses a letter to stand for a value. This is called a variable. For example LET D = 609. This statement puts the value 609 into a box in memory called "D".
Try this. Type:
10 LET A=8 press Enter
The computer makes a box in memory and calls it "A". It puts the number 8 in this box.
Now type:
20 LET B=10 press Enter
The computer makes a box called "B" and places 10 into it.
Type:
30 LET B=15 press Enter
Since there is a box called "B" already with a value of 10 in it, it doesn’t make another box called "B" with a value of 15 in it. The number 10 is just replaced with the number
15.
Now type:
40 LET C=A+B press Enter
This statement is a bit more complicated. Here’s how it works. First, the computer searches for a memory box called "B" and finds in it the number 15. The "+" sign tells the computer to add the numbers found in "A" and "B" together. It does that and the answer is 23. Now, where to put the answer? No problem. The "=" tells the computer to store the answer in a memory box called "C". The computer searches for a box called "C". It doesn’t find one so it makes one in memory and then puts the answer into it.
Of course, if there was a memory variable called "C" that had a number in it from a previous operation, the old number would be replaced by the new one in this statement.
36
Now let’s finish this by typing:
50 PRINT "FIRST NUMBER"; A
60 PRINT "SECOND NUMBER"; B
70 PRINT "THE SUM IS"; C
RUN
You will see the following on the display:
FIRST NUMBER 8
SECOND NUMBER 15
THE SUM IS 23
(Don’t forget to press Enter after you have seen each line to get the next one displayed.) Let’s take a look at the print statements on lines 50 through 70. The words in quotes
are called a STRING or a LITERAL. Whatever you put between a set of quotation marks will appear on the display exactly the way you typed it. Don’t forget that quotation marks come in pairs!
Next, the semicolon tells the print statement to print the next thing immediately to the right of the end of the string. This is the number 8, which is the value in memory box A.
Suppose that you asked the computer to multiply 3 million times 3 million.
37
Let’s try. Type:
10 PRINT 3000000*3000000
RUN
The answer on the display is 9E+12. This is the computer’s way of showing extremely large numbers. A number with the letter E and a number to the right of the decimal point is called scientific or exponential notation. You find the decimal point and move the number of places specified after the "E" to the right filling in with zeros. The long way to write out the above answer is 9,000,000,000,000. The procedure works in reverse for very small numbers. The number 9E-12 is .000000000009. This is a very small positive number. The number -9E+12 is a very large negative number while the number -9E-12 is a very small negative number.
4. STRING VARIABLES
String variables are similar to the numeric variables that we have been working with so far except that the variables contain alphabetic characters(numbers, letters and symbols). The name of the memory variable always contains a $ to distinguish it as a string variable. String variables are not used in arithmetic but allow you to store things like your pet’s name. Here are some examples:
VARIABLE NAMES CONTENTS
A 675
B 2.3434
C$ CURTIS
A$ ALPHABET SOUP
You can store a string variable like this:
10 LET A$="ALPHABET SOUP NO 123"
You can have a numeric variable called A and a string variable called A$. The $ lets BASIC know how to tell them apart.
38
NOTE: For both numeric and string variables, only the first 2 characters of the variable
names are valid. Also, they cannot resemble the name of any command.
Examples: TOTAL is interpreted as the TO command and POTATO is interpreted as variable PO.
5. CONSTANTS
A constant is something that doesn’t change. The computer stores it in memory just like a variable. However, since a constant doesn’t change it has no variable name. The number 6 is a constant; so is 4.567 or 28967.35. "QUICK BROWN FOX" is a string constant.
You can store constants to a variable. That’s usually done to start out a program; later the contents of the variables change. Let’s see. Suppose we want to count to 10.
Type in this program:
New
10 N=0
20 N=N+1
30 PRINT N
40 IF N<10 THEN 20
50 PRINT "THE ANSWER IS"; N
RUN
The statement at line 10 stores the numeric constant zero into N, a numeric variable. In statement 20 the variable will have a numeric constant, 1, added to itself and then the sum of that operation will be stored in place of the value previously stored there.
39
The program in the above example contains a programming construction called a loop. A loop is one or more BASIC statements, usually called a set, that can be executed as many times as you want. The statement in line 40 contains an IF statement. It is called a conditional statement and will be discussed in detail under the topic called Making Decisions.
6. INPUTTING DATA
We have been putting information into the computer by typing constants into programs using statements like the following:
10 LET N=10
20 LET A4$="NANCY LIKES CHOCOLATE CUPCAKES"
Another way to supply data is by using an INPUT statement.
Try this out by typing:
NEW
10 INPUT "GIVE ME A NUMBER"; N
20 PRINT "YOUR NUMBER IS"; N
The computer will print the literal following the INPUT command in line 10 on the display. It will prompt you for a number with the character. You can type any number of digits that you like and press Enter to let the computer know you have finished. Ready? Try it, type: RUN and press Enter.
You can also input alphabetic data into string variables like this program:
10 INPUT "WHAT IS YOUR NAME"; N$
20 PRINT "HI THERE "; N$
You can use as many input statements as you need to get all the values into your program.
40
Try this:
NEW
10 INPUT "GIVE ME A NUMBER"; N1
20 INPUT "AND ANOTHER"; N2
30 PRINT "I WILL ADD THEM"
40 C=N1+N2
50 PRINT "THE ANSWER IS"; C
Type RUN and press Enter to see what happens.
7. MAKING DECISIONS
The IF statement tells the computer that it has to make a decision. It does this by comparing two numbers, arithmetic expressions or string variables. It uses special symbols to represent a condition.
The symbol > means greater than. The symbol < means less than. The symbol = means equal to. The symbol > = means greater than or equal to. The symbol < = means less than or equal to
Here are some conditions:
5 < 10 20 > 10
They are both true because
5 is less than 10 20 is greater than 10
41
A condition is either TRUE or FALSE. The IF statement has a condition. The computer evaluates the condition and decides that if a condition is TRUE it will do something for the TRUE condition.
Take the following:
IF A > 90 THEN PRINT "YOU ARE SMART"
The A > 90 is a condition. The PRINT "YOU ARE SMART" is the thing it does for the true condition. In the above example, let’s give A the value 80. Would the message be printed? No, it would not be printed because the condition is false (80 is less than 90).
Let’s try a program to compute the area of a rectangle.
Type:
NEW
10 INPUT "ENTER THE LENGTH";L
20 INPUT "ENTER WIDTH";W
30 LET A=L*W
40 PRINT "THE AREA IS";A
50 INPUT "ANOTHER? (Y/N)";R$
60 IF R$="Y" THEN 10
70 PRINT "THAT’S ALL FOLKS!"
80 END
42
This program uses the INPUT statement to get values for numeric variables and prints a computed result. It then prompts for a string variable and makes the decision to begin again if the value typed in is a Y.
Here’s another one.
Type:
NEW
10 INPUT "GIVE ME A NUMBER";A
20 INPUT "AND ANOTHER";B
30 PRINT "ADD, SUBTRACT, MULTIPLY OR DIVIDE"
40 PRINT "TYPE IN THE FIRST LETTER OF THE"
50 PRINT "ARITHMETIC OPERATION YOU WANT"
60 PRINT "ME TO DO FOR YOU"
70 INPUT R$
100 IF R$="A" THEN C=A+B : GOTO 200
110 IF R$="S" THEN C=A-B : GOTO 200
120 IF R$="M" THEN C=A*B : GOTO 200
130 IF R$="D" THEN C=A/B : GOTO 200
43
140 PRINT "YOU MADE A MISTAKE"
150 PRINT "TRY AGAIN"
160 GOTO 30
200 PRINT "THE ANSWER IS";C
300 END
This is a long program but it has a lot of new things in it that are worthwhile to know about. Line 70 contains an INPUT statement without the prompt string. Lines 100 through 130 contain two statements for the thing to do when the condition is true. One is a LET statement without the word LET (C=A+B) and the other is a GOTO statement. Both of the statements are separated from each other by the colon( : symbol). The GOTO statement tells the computer the number of the next statement to do. Line 140 is an error trap. It tells you that you have not followed instructions.
You can experiment some more with this program and put in a decision to start the program all over again.
What happens if you change line 300 to be GOTO 10? Yes, you are right. The program continues forever. You can stop it by pressing the Shift and Break keys and resume it by typing in CONT and press Enter.
8. LOOPING
A loop is a set of one or more instructions. These instructions can be repeated as many times as you want. You can create a loop with a GOTO statement.
A program like the following will run forever:
10 INPUT "GIVE ME A NUMBER";N
20 PRINT "YOUR NUMBER IS";N
30 GOTO 10
44
You can modify the program to get out of a loop by using an IF statement to control the loop like the program that calculates the area of a rectangle.
Another way to create a loop is through the use of the FOR and NEXT statements. These statements surround the instructions that you want to repeat.
For example, type the following:
NEW
10 FOR N=1 TO 10
20 PRINT "HELLO"
30 NEXT N
RUN
How many times does the word HELLO get printed? You can change line 20 to print the value of N every time the loop repeats.
Type:
20 PRINT "N IS";N
We could always rewrite the program like this:
10 N=1
20 PRINT "N IS";N
30 N=N+1
40 IF N > 10 THEN END
50 GOTO 20
45
Are they the same? We can also count by 2’s. Let’s bring back the previous program and change line 10.
The entire program looks like this:
NEW
10 FOR N=1 TO 10 STEP 2
20 PRINT "N IS";N
30 NEXT N
RUN
The STEP 2 part changes the meaning hidden in the NEXT N statement to be N = N + 2 or any other number that gets put in the STEP part.
We can even count backwards.
Try this:
NEW
10 FOR N=10 TO 1 STEP -1
20 PRINT N
30 NEXT N
40 PRINT "BLAST OFF"
RUN
46
9. MORE ABOUT GROUPS - GOSUB ... RETURN
How much is 10 degrees Celsius in Fahrenheit? What is 100 degrees Fahrenheit in Celsius? Here’s a program that gives you the answers. It uses the GOSUB and RETURN statements to create a group of instructions that can be executed from various parts of the program. Remember when you use a GOSUB, the program branches to the line number that you specify in the statements that will be executed sequentially until a RETURN statement is encountered. At that point the program will resume at the next statement following the
GOSUB. Confusing? Not really, but first some more background about our problem.
The formula for converting Celsius to Fahrenheit is:
F=(9/5*C)+32
The formula for Fahrenheit to Celsius is:
C=(F-32)*5/9
Now for the program!
Type:
New
10 INPUT "ENTER THE CELSIUS TEMP";C
20 GOSUB 500
30 INPUT "ENTER THE FAHRENHEIT TEMP";F
40 GOSUB 600
50 END
500 F=(C*9/5)+32
47
510 PRINT "THE FAHRENHEIT TEMP IS";F
520 RETURN
600 C=(F-32)*5/9
610 PRINT "THE CELSIUS TEMP IS";C
630 RETURN
REFERENCE SECTION
The REFERENCE SECTION contains a brief explanation of all the commands and statements you will use in this chapter. Refer to this when you need help.
CLEAR
The CLEAR statement is used to assign more memory space for the string variables. Example:
10 Clear 100
This command will assign 100 bytes of memory for strings. If the CLEAR command is not used, the computer will assume the number of bytes of memory for strings to be 50. The use of the CLEAR command only will reserve the same number of bytes as the default value. However, if a value follows the CLEAR command, the computer will assign the number of bytes of that value. If you want to use more strings in your program, set this number to a larger one but, at the same time, you will have less space for your program.
CONT
Also see STOP This command causes the program to resume executing after encountering the BASIC
command called STOP. The program will carry on with the next statement after STOP. You can type CONT to resume the program after you hit the Shift and Break keys.
48
DIM
Line # DIM array-name (array-size). The DIM command reserves space for one dimensional numeric or string arrays. The array-
name may be up to 6 characters long but only the first 2 characters are valid. For a string array the last character must be a $. The array can contain up to 100 elements (0-99).
Example:
10 DIM FRIEND$(50)
10 DIM PRICE(19)
EDIT
Use the EDIT command when you want to change a statement that has been typed into memory without re-typing the entire line. Just type EDIT and the line number and press the Enter key. The statement will appear on the display. Use the LEFT-ARROW and RIGHT- ARROW keys to move the cursor. Use the Del key to remove an unwanted character, or simply type in new characters.
Example:
10 INPUT B press Enter
EDIT 10 press Enter
10 INPUT B_
10 INPUT
B
10 INPUT C_
49
END
Line # END The END statement is used as the last command in a program. It stops the program. Examples:
160 END
999 END
PSET
This command is used for drawing a specified point on the screen. PSET X, Y
(X, Y) is a coordinate of the specified point to be shown.
X represents a value of horizontal position. Y represents a value of vertical position.
Example:
10 CLS
20 PSET 100, 8
The result: a screen pixel at coordinate (100, 8) will be turned on.
PRESET
This command turns off a specified point on the screen. PRESET X, Y (X, Y) is the coordinate of the specified point to be cleared.
X represents a value of a horizontal position. Y represents a value of vertical position.
50
Example:
10 CLS
20 FOR X= 50 TO 100
30 PSET X, 8
40 FOR DELAY= 1 TO 70
50 NEXT DELAY
60 PRESET X, 8
70 NEXT X
80 END
VOICE
This is a command to generate voice.
VOICE(X) X is the voice number
A LIST OF AVAILABLE VOICE
Voice Num(X) Voice
0 zero 1 one 2 two 3 three 4 four 5 five 6 six 7 seven 8 eight 9 nine
10 ten
51
11 A 12 B 13 C 14 D 15 E 16 F 17 G 18 H 19 I 20 J 21 K 22 L 23 M 24 N 25 O 26 P 27 Q 28 R 29 S 30 T 31 U 32 V 33 W 34 X 35 Y 36 Z(Zed) 37 Z(Zee)
FOR ... TO ... STEP ... NEXT
Line# FOR variable = initial value TO final value STEP step size (optional) Line# Line# Line# Line# NEXT variable
52
The FOR ... NEXT statement repeats a task a set number of times without having to rewrite it. All statements between the FOR and NEXT command are repeated based on the initial value, the final value and the step size. If the STEP portion of the command is not used, it is assumed to be 1.
Example:
60 FOR ITEMS=1 TO 20
70 INPUT PRICE
80 SUM=PRICE+SUM
90 NEXT ITEMS
FUNCTIONS
A function is a mathematical procedure which when applied to a certain value will give a new value. We call the value in brackets ( ), the argument and the new value the result.
Example: SQR is the square root function. So if we type PRINT SQR (9) (press Enter) we will get the answer 3.
Example:
Y=9 : X=SQR(Y) : PRINT X press Enter
We will get the answer 3.
In these two examples 9 is the argument, SQR is the function and 3 is the result.
53
A LIST OF NUMERIC FUNCTIONS
Function What it does
ABS (X) Returns the absolute (postive) value of X
SGN (X) Returns the sign of the argument
X negative returns -1
X postive returns + 1
X zero returns 0
SQR (X) Returns the square root of X. X cannot be negative.
LOG (X) Gives the natural logarithm of X, i.e., the logarithm to the base e
(=2.71828). The value of the argument must be greater than zero.
EXP (X) Gives you the value ex - i.e., the natural antilogarithm of X.
INT (X) Gives the greatest integer which is less than or equal to X.
RND(X) Gives a random whole number between 1 and X. If X equals zero,
RND (X) returns a random number between 0 and 1. X cannot be negative.
SIN (X) The argument of the trigonometry functions is taken to be in radians
COS (X) (1 radian=360/2π = 57.296 degrees). The range of X is -999 < (X)
TAN (X) < 999.
ATN (X) This gives the result of ARC TANGENT in radians.
ARITHMETIC FUNCTIONS
ABS (X)
This gives the absolute (positive) value of the argument. So ABS (-7)=7. Example:
PRINT ABS (7-2*4) press Enter
1
54
SGN (X)
This function will give the value of +1 if X is positive, 0 if X is zero, and -1 if X is negative. So SGN(4.3)=1; SGN(0)=0; SGN(-276)=-1
Example:
A=6 press Enter
PRINT SGN (A); SGN (A-A) press Enter
1 0
INT (X)
This converts arguments which are not whole into the largest whole number below the argument. So INT (5.9)=5; also INT (-5.9)=-6. Note that with negative arguments, the absolute value of the result returned by INT will be greater than that of the argument.
Example:
PRINT INT (-6.7) press Enter
-7
RND (X)
This will produce a random number between 1 and X if X is positive. Example:
PRINT RND (19) press Enter
You will get a number between 1 and 19. RND (0) will give you a number between 0 and 1.
Note:X cannot be negative.
STRING FUNCTIONS
We can also use functions to act on strings. Have a look at the following: Note: From now on, the Enter key sign will be deleted for simplicity. Remember to
press the Enter key after each line of entry.
55
LEN
This function computes the length of the string argument, which must be in brackets. So if you type PRINT LEN ("JOHN") the computer will return the result 4. This is telling you that there are 4 characters in the string "JOHN". Blank spaces have the value of characters. Thus if you put in spaces "J O H N", it comes out as 7 characters.
STR$
The STR$ function changes a number argument into a string. Let us take a look at the following example and see how it works.
Example:
A$=STR$(73)
This is the same as saying A$="73". Here is a sample program: Example:
10 A$=STR$(7*3)
20 B$=A$+"BIG"
30 PRINT B$
RUN
21BIG
VAL
VAL works like STR$ but in reverse. It changes a string argument into a number. Look at the following short program.
56
Example:
10 A$="33"
20 B$="20"
30 C=VAL(A$+B$)
40 D= VAL (A$) + VAL (B$)
50 PRINT C;D
RUN
3320 53
GRAPHICS FUNCTION
PGET
Returns the color attribute of a specified pixel. PGET(X, Y) = n
n Returns
1 the current coordinates (X,Y) turns the pixel status ON 0 the current coordinates (X,Y) turns the pixel status OFF
SUBSTRINGS
It is also possible to get substrings of strings. A substring is, as you might guess, a part of a string. For example: "ABC" is a substring of "ABCDE". The following three functions operate on substrings.
LEFT$ (A$,N)
This will return the substring from the left-most of string A$, the first character to the Nth character.
57
Example:
10 A$="ABCDE"
20 B$=LEFT$ (A$+"FGH",6)
30 PRINT B$
RUN
ABCDEF
RIGHT$ (A$,N)
This will return a substring but starting from the Nth character from the end and running to the last one - the right-most character in the string A$.
Example:
10 A$="WHY"
20 B$=RIGHT$(A$+"ME",4)
30 PRINT B$
RUN
HYME
58
MID$ (A$,M,N)
This function returns a substring of the string A$ starting from the Mth character with a length of N characters.
Example:
10 A$="ABCDEFGH"
20 B$=MID$(A$,2,3)
30 PRINT B$
RUN
BCD
ASC(A$)
The ASC statement will return the ASCII code (in decimal) for the FIRST character of the specified string. Brackets must enclose the string specified. Refer to the appendix for the ASCII code table. For example the ASCII decimal value of "X" is 88. If A$="XAB", then ASC (A$)=88.
Example:
10 X=ASC("ROY")
20 PRINT X
RUN
82
CHR$ (N)
This statement works the opposite way as the ASC statement. The CHR$ statement will return the string character which corresponds to the given ASCII code. The argument may be any number from 32 to 255 or any variable expression with an integer value within that range. Brackets must be put around the argument.
59
Example:
30 PRINT CHR$(68)
RUN
D
GOSUB...RETURN
Line# GOSUB first line number of subroutine. Line# Line# Line# Line# first line number of subroutine Line# Line# RETURN The GOSUB command tells the computer to GOTO another line number. After the process
has been completed, a RETURN statement is used to send the computer back to the line immediately after the GOSUB. These statements are used to process a series of commands that are frequently used.
Example:
30 GOSUB 120
.
.
other program lines
.
.
120 PRINT "WELCOME TO THE"
130 PRINT "PRECOMPUTER PRESTIGE"
140 RETURN
60
GOTO
Line # GOTO line number The GOTO statement is used to change the normal flow of the program(which is from the
lowest statement number to the highest). A GOTO command transfers control to the specified line.
Examples:
10 GOTO 130
200 GOTO 65
IF...THEN...ELSE
In general terms, the IF...THEN... statement is used for CONDITIONAL BRANCHING. It uses the general form "IF (condition) THEN (action clause)". A condition is made up of an expression, a relation and an expression.
Any BASIC expression, either numeric or string, may be used, but both expressions must be the same type.
Relations or comparisons used in the IF...THEN statement are the following:
= Equal to < = Less than or equal to < > Not equal to > = Greater than or equal to < Less than > Greater than
Examples of how you can use conditionals:
IF....THEN A=B
IF....THEN GOTO
IF....THEN GOSUB
IF....THEN PRINT
IF....THEN INPUT
61
Example:
30 IF X >25 THEN 60
If the condition X>25 is true, the computer is told to jump to line 60 (Note: the GOTO is optional after THEN).
If the condition is not true, that is, if X is not greater than 25, then the computer simply carries on with the normal line number order in the program. Notice that it is not necessary to use the ELSE part of the command here, as this is optional.
Example:
10 INPUT A,B
20 IF A > B THEN 50
30 IF A < B THEN 60
40 IF A = B THEN 70
50 PRINT A; "IS GREATER THAN"; B:END
60 PRINT A; "IS LESS THAN"; B: END
70 PRINT A; "IS EQUAL TO";B
80 END
RUN
? 7
?? 3
7 IS GREATER THAN 3
62
Example:
40 IF P=6 THEN PRINT "TRUE" ELSE PRINT "FALSE"
In this example, if P=6 the computer will print TRUE. Any other value will produce a FALSE. In either case the computer will carry onto the next line.
It is possible for more than one statement to follow the THEN or ELSE command. A colon separates the statements.
Example:
50 IF A =5 THEN PRINT "TRUE": S=S-3: GOTO 90 ELSE PRINT
"FALSE": K=K+8
So if A equals 5 the computer will print TRUE, subtract 3 from the variable S and go to line 90. If A does not equal 5 the computer will print FALSE, add 8 to the variable K and then carry on with the next normal line.
LOGICAL OPERATORS
Logical operators(IF...THEN...ELSE and such statements) are used where a condition is used to determine subsequent operations within the user program. The logical operators are: AND, OR, and NOT.
For the purpose of this discussion, A and B are relational expressions having only TRUE and FALSE. Logical operations are performed after mathematical and relational operations.
Operator Example Meaning
NOT NOT A If A is true, NOT A is false
AND A AND B A AND B have the value true, only if A and B are both ture.
A AND B have the value false if either A or B is false.
OR A OR B A OR B has the value true if either A or B or both are true.
It has the value false if both are false.
TRUTH TABLES
The following tables are called TRUTH TABLES. They illustrate the results of the previous logical operations with both A and B given for every possible combination of values.
63
TRUTH TABLE FOR "NOT" FUNCTION
A NOT A
TF
FT
TRUTH TABLE FOR "AND" FUNCTION
ABA AND B
TT T
TF F
FT F
FF F
TRUTH TABLE TABLE FOR "OR" FUNCTION
AB A OR B
TT T
TF T
FT T
FF F
Note that T = TRUE and F = FALSE. Example:
10 INPUT A,B,C
20 IF A=B AND B=C THEN PRINT "A=B=C"
30 IF (NOT A=B) OR (NOT B=C) THEN 50
64
40 END
50 PRINT "A=B=C IS FALSE"
60 END
RUN
? 10
?? 5
?? 7 A=B=C IS FALSE
Moreover AND, OR, and NOT can be used to manipulate numerical values. These operations are based on binary numbers with 1 and 0 representing TRUE and FALSE respectively.
For example:
i) NOT 1=-2 [1=binary 00000001 and -2=binary 11111110, so it just changes the 1 to 0
and 0 to 1. In other words, TRUE(1) changed to FALSE(0) and FALSE(0) is changed to TRUE(1).]
ii) 6 OR 13=15 [6=binary 00000110 and 13=binary 00001101, so, with reference to the
OR truth table, 6 OR 13 =15=binary 00001111]
iii) 6 AND 13=4 [6=binary 00000110 and 13=binary 00001101, so with reference to the
AND truth table, 6 AND 13=4 binary 00000100]
INPUT
Line # INPUT "(optional character string)"; variable 1, variable 2,....
INPUT allows the user to type in the value of a variable at the time the program is RUN.
If an optional character string is used, this message will be printed before the question is asked. The type of data to be INPUT varies according to the type of the variable.
Examples:
35 INPUT AMOUNT
140 INPUT "WHAT IS YOUR NAME:";NAME$
65
LET
Line # LET variable = variable expression The variable expression is calculated and the result is stored under the variable. The word
LET is optional.
Examples:
40 LET SUM=A+B+C
25 LET AMOUNT=PRICE-DISCOUNT
LIST
LIST (optional line number) LIST is used to display the active program. If the optional line number is omitted, the
program will be displayed from the first line onward. If the line is longer than 20 characters, you must use (picture of the Right key) to move to the right. To continue the LISTING press the Enter key. To discontinue the LISTING press the Shift and Break keys.
Examples:
LIST
LIST 50
NEW
NEW erases all program lines from the active program area.
PRINT
Line # PRINT expression and/or character string The PRINT statement is used to produce output on the display panel. The PRINT command
will print one or several items - either expressions or strings. Each item in the list should be separated by a comma or a semicolon.
66
Example:
80 PRINT NAME$; "IS COMING"
230 PRINT "SUM="; A+B+C
READ AND DATA
When it is necessary to enter a lot of information or data into the computer, using the INPUT statement can be very time consuming. To help out use the READ and DATA commands.
Example:
10 DATA 10,60,70,80,90
20 READ A,B,C,D,E
30 PRINT A;B;C;D;E
RUN
10 60 70 80 90
The READ statement consists of a list of variable names with commas between each variable. The DATA statement consists of a list of expressions separated by commas. These
expressions can be either numeric or strings. The READ statement makes the computer look up the value of its variables from the DATA statement. When the computer goes to READ first it will assign the first expression from the DATA list. The next time it goes to READ it will assign the second value and so on. If the READ runs out of DATA you will get "? OUT OF DATA ERROR."
RESTORE
If you want to use the same data later on in the program you can do so by using the RESTORE statement.
67
Example:
10 DATA 1,3,8,9
20 READ A,B,D
30 RESTORE
40 READ X,Y
50 PRINT A;B;D
60 PRINT X;Y
70 END
RUN
1 3 8
1 3
The RESTORE command makes subsequent READ statements get their values from the start of the first DATA statement.
Now see if you can work out what is happening here.
Example:
10 REM FIND AVERAGE
20 DATA 0.125,3,0.6,7
30 DATA 23,9.3,25.2,8
40 S=0
50 FOR I=1 TO 8
60 READ N
70 S=S+N
68
80 NEXT
90 A=S/8
100 PRINT A
RUN
9.52813
REM Line # REM text REM is used to add comments in your program which are ignored when the program is
RUN.
Example:
10 REM**GUESSING GAME**
20 REM TEST OF SORTING
RUN
RUN tells the computer to begin to perform your program beginning with the lowest statement number.
STOP ... CONT Line # STOP
CONT
The STOP command halts the RUNNING of a program at that line. This is helpful for debugging. To CONTINUE at the next line after the STOP command, type CONT directly without a line number.
Example:
800 STOP
69
FORMAT
To format a RAM cartridge.
LOAD
To load a program from a RAM cartridge.
ERASE
To erase a file from a RAM cartridge.
SAVE
To save a file from the RAM buffer to a RAM cartridge.
DIR
To show the directory of files saved on the RAM cartridge.
EDIT
To edit a file.
LLIST
To print out the program in the RAM buffer.
NEW
To initialize a BASIC program and delete the program in the RAM buffer.
CHR$
To display a symbol from the character table.
APPENDIX
EXAMPLE PROGRAMS
1. AGE
0 REM HOW OLD ARE YOU?
10 INPUT "You were born in what year"; Y1
20 INPUT "What year is this"; Y2
30 IF Y2 < Y1 THEN GOTO 60
40 PRINT "So, you will be"; Y2 - Y1; "years old this year."
50 END
60 PRINT "Incorrect data! Please enter again."
70 GOTO 10
70
2. HAPPYSAD
0 REM Happy 10 INPUT "Are you happy (Y/N)"; A$ 20 IF A$ = "Y" OR A$ = "y" THEN 40 30 IF A$ = "N" OR A$ = "n" THEN 90 31 PRINT "Please say 'Y' or 'N'" 32 GOTO 10 40 PRINT " " 50 PRINT " ^ ^ " 60 PRINT " ^ " 70 PRINT " ";CHR$(92);"_/ " 80 END 90 PRINT " " 100 PRINT " ^ ^ " 110 PRINT " ^ " 120 PRINT " /---";CHR$(92) 130 END
3. AGECHECK
0 REM Just Right 10 INPUT "What is your age"; AGE 20 PRINT "Oh! You are"; AGE; "years old!" 30 IF AGE < 9 THEN GOTO 70 40 IF AGE > 14 THEN GOTO 200 50 PRINT "You’ll have fun learning BASIC!" 60 END 70 PRINT "You may find BASIC" 80 PRINT "a little bit difficult!" 90 END 200 PRINT "BASIC may be too easy for you!" 210 END
71
4. TALKING
0 REM TALKING MACHINE
10 PRINT "I’m the talking machine!"
20 INPUT "What’s your name"; NAME$
30 PRINT "Hello, "; NAME$; "!. Nice to meet you."
40 PRINT "Is this the first time you will"
50 INPUT "learn about programming (Y/N)"; ANSWER$
60 IF ANSWER$ = "Y" OR ANSWER$ = "y" THEN GOTO 200
70 IF ANSWER$ = "N" OR ANSWER$ = "n" THEN GOTO 300
80 PRINT "I don’t know what you mean!"
90 PRINT "Please say ‘Y’ OR ‘N’!"
100 GOTO 40
200 PRINT "I hope BASIC Tutor can help you!"
210 END
300 PRINT "I hope you learn even"
310 PRINT "more in Basic Tutor!"
320 END
72
5. WORMS
0 REM WORM QUELIE
10 INPUT "How many letters in your first name"; NUMBER
20 INPUT "How many letters in your last name"; L$
30 LET L = VAL(L$)
40 LET SUM = L + NUMBER
50 PRINT "Then your full name is"; SUM; "letters long."
60 END
6. ADDMINUS
0 REM CALCULATE
10 INPUT "Please input the first number"; A
11 INPUT "And the second number"; B
20 PRINT "Do you want to find their"
30 INPUT "sum(S) or difference(D)"; ANS$
40 IF ANS$ = "D" OR ANS$ = "d" THEN GOTO 80
50 IF ANS$ = "S" OR ANS$ = "s" THEN GOTO 200
60 PRINT "Please type ‘S’ or ‘D’!"
70 GOTO 20
80 PRINT "The difference of"
73
90 PRINT A; "and "; B; "is "; A - B; "."
100 END
200 PRINT "The sum of"
210 PRINT A; "and "; B; "is "; A + B; "."
220 END
7. SECRET
0 REM Secret
10 NO = RND(100)
20 PRINT "Hi! I’ve got a secret number"
30 PRINT "between 1 and 100."
40 INPUT "Guess it by typing a number"; ANSWER
50 IF ANSWER = NO THEN GOTO 200
60 IF ANSWER > NO THEN GOTO 100
70 PRINT "No! The secret number is bigger."
80 GOTO 40
100 PRINT "No! The secret number is smaller."
110 GOTO 40
200 PRINT "Yes! The number is"; NO; "."
210 END
74
8. ADDUP
0 REM Add-up
10 LET X = RND(100)
20 LET Y = RND(100)
30 PRINT "If"; X; "plus"; Y; "is equal to SUM,"
40 INPUT "then what is the value of SUM"; ANS
50 IF ANS = X + Y THEN PRINT "Yes, you’re right!": END
60 PRINT "Oh, no! The answer is"; X + Y; "."
70 END
9. HANGMAN
0 REM HANGMAN
10 X = RND(5)
20 LIVE = 5
30 FOR I = 1 TO X
40 READ SECRET$
50 NEXT I
60 LET L = LEN(SECRET$)
70 PRINT "Let’s play a game of hangman."
80 PRINT "The word has"; L; "letters."
75
90 LET D$ = ""
100 FOR I = 1 TO L: D$ = D$ + "-": NEXT I
110 PRINT "You have"; LIVE; "chance(s)"
120 PRINT D$
130 INPUT "Make a guess:"; G$
140 T$ = ""
150 GOSUB 3000
160 FOR I = 1 TO L
170 IF G$ = MID$(SECRET$, I, 1) THEN 200
180 T$ = T$ + MID$(D$, I, 1)
190 GOTO 210
200 T$ = T$ + G$
210 NEXT I
220 IF T$ = SECRET$ THEN GOTO 4000
230 IF T$ = D$ THEN 1000
240 IF LIVE = 0 THEN 2000
250 D$ = T$
260 GOTO 110
270 DATA "CATAPULT", "TOGGLE"
280 DATA "PIGEON", "BUTTON", "BATTLE"
76
1000 PRINT "You lose a chance!"
1010 LIVE = LIVE - 1
1020 GOTO 240
2000 PRINT "Game over, the answer is "; SECRET$; "."
2010 END
3000 G$ = LEFT$(G$, 1)
3010 A = ASC(G$)
3020 IF A > 96 AND A < 123 THEN A = A - 32
3030 G$ = CHR$(A)
3040 RETURN
4000 PRINT "You are right,"
4010 PRINT "the answer is "; SECRET$; "."
4020 END
10.BIRTHDAY
0 REM Birthday
10 PRINT "What is your birthday?"
20 PRINT "e.g. (January 17,1986)."
30 INPUT "Enter your birthday"; D$, Y$
40 FOR I = 1 TO 12
77
50 READ M$, T$
60 IF M$ <> LEFT$(D$, LEN(M$)) THEN 80
70 LET MSG$ = T$: LET MON$ = M$
80 NEXT I
90 IF MSG$ = "" THEN RESTORE: GOTO 30
100 PRINT "You were born in "; MON$; "."
110 PRINT "Did you know "; MSG$
120 PRINT " was also born in "; MON$; "?"
130 DATA "January", "Wolfgang Amadeus Mozart"
140 DATA "February", "Charles Dickens"
150 DATA "March", "Michelangelo"
160 DATA "April", "Charlie Chaplin"
170 DATA "May", "Florence Nightengale"
180 DATA "June", "Bjorn Borg"
190 DATA "July", "Amelia Earhart"
200 DATA "August", "Napolean Bonaparte"
210 DATA "September", "George Gershwin"
220 DATA "October", "Margret Thatcher"
230 DATA "November", "Marie Curie"
240 DATA "December", "Issac Newton"
78
THE ASCII CODE TABLE
Decimal Printable Decimal Printable Decimal Printable Value Character Value Character Value Character
32 64 @ 96 33 ! 65 A 97 a 34 35 # 67 C 99 c 36 $ 68 D 100 d 37 % 69 E 101 e 38 & 70 F 102 f 39 40 ( 72 H 104 h 41 ) 73 I 105 i 42 43 + 75 K 107 k 44 45
46 . 78 N 110 n
47 / 79 O 111 o 48 0 80 P 112 p 49 1 81 Q 113 q 50 2 82 R 114 r 51 3 83 S 115 s 52 4 84 T 116 t 53 5 85 U 117 u 54 6 86 V 118 v 55 7 87 W 119 w 56 8 88 X 120 x 57 9 89 Y 121 y 58 : 90 Z 122 z 59 ; 91 60 < 92 \ 124 | 61 = 93 62 > 94 ^ 126 63 ? 95
"
*
,
66 B 98 b
71 G 103 g
74 J 106 j
76 L 108 l 77 M 109 m
[
]
_
123
125
127
{
}
~
79
Decimal Printable Decimal Printable Decimal Printable Value Character Value Character Value Character
128 Ç 160 á 192 129 ü 161 í 193 I 130 é 162 ó 194 131 â 163 ú 195 132 ä 164 ñ 196 133 à 165 Ñ 197 134 å 166 135 ç 167 136 ê 168 137 ë 169 Ã 201
138 è 170 ¬ 202
139 ï 171 203 140 î 172 204 141 ì 173 i 205
142 Ä 174 « 206 e 143 Å 175 » 207
144 É 176 IJ 208 145 æ 177 ij 209 146 Æ 178 210 Ê 147 ô 179 I 211 Ë 148 ö 180 ø 212 È 149 ò 181 Á 213 ã 150 û 182 Â 214 Í 151 ù 183 À 215 Î 152 ÿ 184 153 Ö 185 154 Ü 186 218 155 187 219 156 £ 188 220
ª º
¿
1
/
2
1
/
4
o
198 199
200 π
216 Ï 217
157 189 221 158 x 190 ¥ 222 159 ƒ 191 223
80
`
Decimal Printable Decimal Printable Decimal Printable Value Character Value Character Value Character
224 Ó 235 246 ÷ 225 ß 236 247 x 226 Ô 237 248 227 Ò 238 228 õ 239 229 Õ 240 230 241 ± 252 231 242 = 253 232 243 Œ 254 233 244 œ 255 234 245
~
249
'
^
§
250 251
THE ERROR MESSAGES
°
¨
CANNOT CONTINUE
An attempt is made to continue a program that:
1. has halted due to an error,
2. has been modified during a break in execution, or
3. does not exist.
DIVISION BY ZERO
A division by zero is encountered in an expression, or the operation of involution results in zero being raised to a negative power.
EXTRA IGNORED
More than one parameter is entered to ‘INPUT’ command.
ILLEGAL DIRECT
A statement that is illegal in direct mode command. Example: INPUT
81
ILLEGAL FUNCTION CALL
A parameter that is out of range is passed to a math or string function. This error may also occur as the result of:
1. a negative or unreasonably large subscript
2. a negative or zero argument with LOG
3. a negative argument to SQR
4. a negative mantissa with a non-integer exponent
5. an improper argument to MID$, LEFT$, RIGHT$.
MISSING OPERAND
The operand of at least one command is missing.
NEXT WITHOUT FOR A variable in a NEXT statement does not correspond to a previously executed unmatched
FOR statement variable.
OUT OF DATA
A READ statement is executed when there are no DATA statements with unread data remaining in the program.
OUT OF MEMORY
A program is too large, had too many FOR loops or GOSUB, too many variables, or expressions that are too complicated.
OUT OF STRING SPACE
String variables have caused BASIC to exceed the amount of free memory remaining.
OVERFLOW
The result of a calculation is too large to be represented in the number format. If underflow occurs, the result is zero and execution continues without an error.
REDIMENSIONED ARRAY
Two DIM statements are given for the same array, or a DIM statement is given for an array after the default dimension of 10 has been established for that array.
82
REDO A string is assigned to a numeric variable during the execution of the INPUT command.
RETURN WITHOUT GOSUB
A RETURN statement is encountered for which there is no previous unmatched GOSUB statement.
STRING FORMULA TOO COMPLEX
A string expression is too long or too complex. The expression should be broken into smaller expressions.
STRING TOO LONG
An attempt is made to create a string more than 255 characters long.
SUBSCRIPT OUT OF RANGE
An array element is referenced either with a subscript that is outside the dimensions of the array or with the wrong number of subscripts.
SYNTAX ERROR
A line is encountered that contains some incorrect sequence of characters(such as unmatched parentheses, misspelled command or statement, incorrect punctuation, etc.)
TYPE MISMATCH
A string variable name is assigned a numeric value or vice versa; a function that expects a numeric argument is given a string argument or vice versa.
83
CHAPTER 7 CALCULATOR
TM
The Calculator function turns the PRECOMPUTER PRESTIGE calculator with a 14 digit memory. The number keys and the 19 specially marked keys in the second and third rows of the keyboard are used in the Calculator activity. To clear the screen, use the key at the bottom of the keyboard.
BASIC CALCULATOR OPERATIONS
The basic calculator operations are:
Addition: or Shift +
Subtraction: or
Multiplication:
Division:
unit into an operational
USING THE MEMORY FEATURES:
To input a number to memory:
To recall a number from memory:
To add a number to the number in memory:
To subtract a number from the number in memory:
84
Example:
Input Display
23+45+78
Enter
M= 146
23+45+78
= 146
M= 146
34 - 78
Enter
M= 146
34-78
= -44
M= 102
34-78
= -44
M= 102
23 - 6 + 9
Enter
M= 102
23-6+9
=26
M= 76
23-6+9
ADVANCED FUNCTIONS
The Calculator has special function keys located on the second and third rows of the keyboard. Always press the function key first when using it in a problem and then enter the numbers it is to operate on.
AIM Operation Display
Square root of a number 9 sqrt 9
Enter
3
Square of a number 3 sqr 3
Enter
9
The constant e to the power 2 exp 2
of the entered number.
Enter
7.38906
(e=2.71828)
LN function 100 In 100
Enter
4.60517
Log 10 function 100 log 100
Enter
2
85
TRIGONOMETRIC FUNCTIONS
All the trigonometric functions can take two forms of input — radians and degrees. If you just type in a number, the Calculator assumes the number is in radians. To enter a number in degrees, press the degree sign after inputting the number.
Function Operation Display
SINE 60 sin 60°
Enter
-0.30481
SINE 60 sin 60°
Enter
0.866025
COSINE 60 cos 60°
Enter
-0.952413
COSINE 60 cos 60°
Enter
0.5
TANGENT 60 tan 60°
Enter
0.32004
TANGENT 60 tan 60°
Enter
1.73205
ARC TANGENT 60 atn 60°
Enter
1.55413
ARC TANGENT 60 atn 60°
Enter
--E-­(atn 60° produces an error)
π (CONSTANT)* 3.141592654
* This special constant can be entered into any problem by using this key.
86
CHAPTER 8 TIME LIMITS
Activity Timing Code
Word Games All Word Games 1
(except Word Puzzle and Word Search) Word Puzzle 2
Word Search 2 Math Games 1 Trivia Games 1 Logic Games The Great Escape 3
Path Finder 4
Disc Challenge 5
Step By Step 1 6
Step By Step 2 None
Secret Sequence None Business Basics None
TIMING CODE
1. In "one player" mode, the answer must be inputted within one minute. In "two player" mode, the two players must press their respective player’s button in 30 seconds to get to answer first. When it is your turn, you have only 30 seconds to answer.
2. In "one player" mode, you have 5 minutes to finish the puzzle. In "two player" mode, the players alternate turns. Each player has 30 seconds to answer a question.
3. Level Timing(minutes)
13 28 312 415
4. Level Timing(minutes)
13 24 35 46
5. Level Timing(minutes)
13 28 312 430
6. Level Timing(minutes)
13 25 38 410
87
CHAPTER 9 SCORING
Activity Scoring Code
Word Games All Word Games 1
(except Word Puzzle and Word Search) Word Puzzle 2 Word Search 2
Math Games All Math Games 1
(except Story Problem) Story Problem 3
Trivia Games Key in the Answer 1
Multiple Choice 3
Logic Games None
Business Basics All Business Basics None
(except Typing Game) Typing Game 4
SCORING CODE
1. "One Player" Mode
Questions per round 5 Correct answer on 1st try 20 Correct answer on 2nd try 10 Correct answer on 3rd try 5
"Two Players" Mode
Questions per round 5 Starting Score 100 Correct answer
1st player 20 2nd player 10
Wrong answer
1st player -20 2nd player -10
88
2. "One Player" & "Two Players" Mode
Words per round 10 Correct answer 10
3. "One Player" Mode
Questions per round 5 Correct answer on 1st try 20 Correct answer on 2nd try 10
"Two Players" Mode
Questions per round 5 Starting Score 100 Correct answer
1st player 20 2nd player 10
Wrong answer
1st player -20 2nd player -10
4. For each word that is correctly typed, 1 point is given. When a word reaches the bottom, it will deduct one life. After losing 3 lives, the game will end. When player earns 250 points, he/she will promote to the next level. The maximum score for this game is 999.
89
CHAPTER 10 HOW TO USE AN EXPANSION
CARTRIDGE
There is an entire library of optional expansion cartridges available for the PRECOMPUTER PRESTIGETM unit.
To use a cartridge, follow these steps:
1. Turn the unit OFF.
2. Insert a cartridge into the slot located on the right-hand side of the unit.
3. Turn the unit ON.
4. Press key on the Activity Selector and the cartridge activities will be accessed.
Look for the following titles at your local retailer or order them directly from our Consumer Services Department. Just call 1-800-521-2010 in the US, 01235-555545 in the UK, or 1-800-267-7377 in Canada. A service representative will be happy to help you.
Item No. 80-1410 SUPER SCIENCE Item No. 80-1533 FAMOUS THINGS & PLACES Item No. 80-0989 BIBLE KNOWLEDGE Item No. 80-1001 FANTASY TRIVIA Item No. 80-1002 GENERAL KNOWLEDGE II Item No. 80-1003 SPORTS HISTORY Item No. 80-2314 FAMILIAR FACES Item No. 80-2315 HISTORICAL HAPPENINGS Item No. 80-2333 ARTS, ENTERTAINMENT & MORE Item No. 80-2334 CUSTOMS & CULTURES
TM
TM
TM
TM
TM
TM
TM
TM
TM
TM
Item No. 80-1531 32K RAM Memory Expansion Cartridge (Expands the memory of the BASIC programming activity and the word processing activity.)
Item No. 80-12051 Space Scholar Item No. 80-12053 Frenzy of Facts Item No. 80-12052 Spreadsheet Success
TM
TM
TM
90
CHAPTER 11 CARE AND MAINTENANCE
1. Keep the unit clean by wiping it with a slightly damp cloth.
2. Keep the unit out of direct sunlight and away from heat.
3. Remove the batteries when the unit is not in use for extended periods of time.
4. Do not drop the unit on hard surfaces or try to dismantle the unit.
5. Unplug the AC adapter when the unit is not in use.
6. Do not expose the unit to moisture or get it wet.
7. Please remove the protective clear plastic film covering the LCD screen before using this product.
IMPORTANT NOTE:
Creating and developing learning toys is accompanied by a responsibility that we at
VTECH® take very seriously. We make every effort to ensure the accuracy of the
information which forms the value of our product. However, errors sometimes can occur. It is important for you to know that we stand behind our products and encourage you to call our Consumer Services Department at (800) 521-2010 in the US, 01235-555545 in the UK or 1-800-267-7377 in Canada with any problems and/or suggestions that you might have. A service representative will be happy to help you.
Note: This equipment generates and uses radio frequency energy and if not installed and used
properly, that is, strict accordance with the manufacturer’s instructions, may cause interference to radio and television reception. It has been type tested and found to comply with the limits for a Class B computing device in accordance with the specifications in Subpart J of Part 15 FCC Rules, which are designed to provide reasonable protection against such interference in a residential installation. However, there is no guarantee that interference will not occur in particular installation. If this equipment does cause interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one or more of the following measures:
reorient the receiving antenna relocate this product with respect to the receiver move this product away from the receiver
91
Loading...