home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
totallyamos
/
issue1
/
programming
/
amos_kids.seq
< prev
next >
Wrap
Text File
|
1991-09-02
|
9KB
|
212 lines
209
eca00070ff23fe008033300fd5b
^1KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
^3@2AMOS FOR KIDS.@
^1KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK
^2 Welcome to the spot that's for the younger Amos Users, but noone
^2will mind if the grownups want to join in!
^4 In Amos For Kids this time, we have a program for you to learn from
^4and alter, a screen full of pictures you can load into Dpaint and
^4colour in, a spot for advertising for penpals and last but not least,
^4news of where you can find out how to win a copy of PAINT ME A STORY.
^3[2C L I C K ^2[0ON THE DOWN ARROW FOR MORE!!!!
^6-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
^1 There is a program on this disk that has been written just for you,
^1we hope that you will use it and start to learn a bit about
^1programming in [2Amos Basic.[0
^2 It's a simple program, but it should help you learn a few commands
^2so that you can amaze your friends!
^5 The program is mostly to do with printing on the screen, then
^5altering the information inside the program to print out a different
^5result.
^4 The program has lots of REMS, these are notes put into the program
^4but marked with a " ' " so that the computer does not take any notice
^4of what has been written. If you list the program, you will be able
^4to read these notes and see what commands are being used in the
^4different parts ofthe program.
^1 If you have a printer, you could print out this article, (press 'P')
^1and have it to read when you are looking at the listing.
^2 The program starts by turning off the cursor, that's the little
^3flashing ^2 line that tells you where you are on the screen. Next the
^2flash colour is turned off, then the screen is cleaned up and
^2everything turned to colour 0.
^5 There are 16 colours that can be used in this program, computers are
^5strange, they start counting at 0, so the numbers you can choose are
^50 - 15. You can try changing the numbers of the paper, which is your
^5background colour, and your pen, which is the colour you'll be
^5writing in.
^4 The next part of the program will ask the person using the program
^4for his or her name. Now you will have to decide where to print the
^4question "What is your name?"
^1 To do this you must use the Locate command. to use this you must
^1find out the coordinates on the screen of the place that you want to
^1start printing. Don't panic! This is not as hard as it sounds.
^2 Imagine that there is a line going along the top edge of your
^2screen, this is called the X axis. On the screen in the program, it
^2is divided up into 39 sections.
^5 Next imagine a line going from the top to the bottom of the screen,
^5this is called the Y axis, and it is divided into 24 sections on your
^5screen.
^4 Look at the box in the listing that describes this. In the program,
^4the printing will start at 1 on the X axis, and 2 on the Y axis, so
^4that it is put a little way down from the top of the screen.
^1 Now you want the computer to ask a question, then wait for you to
^1type something in, it will wait until you press <RETURN> before doing
^1anything else.
^2 To tell the computer (let's call it Amy) to wait for you to answer
^2the question, you use the Input command.
^4 Amy will put your answer into a variable, which is like a box where
^4Amy stores information. In our program, the box is called NAME$.
^4The variables that have $ in them, are called String variables and
^4can hold both letters and numbers.
^5 Now we want to move the print position further down the screen, say
^52 lines lower down. So this time it will be Locate 1,4.
^1 Let's change the colour of your pen, to colour 4.
^2 Now we want Amy to ask "How old are you?" The answer to this will
^2also be put into a variable (box), but this time it will be a numeric
^2variable, and doesn't have $ at the end. This sort will only
^2remember numbers, and you can use it to do maths, which you cannot do
^2with the String variable. You will see what we mean in a minute.
^4 Again Input is used to tell Amy to wait for an answer, which is put
^4in a variable called AGE.
^5 Let's tidy up the screen next, it's Screen 0. Do you remember how
^5to clean up the screen?
^1 If you said Cls, then well done! We'll change the screen colour
^1using this command, remember to change the paper colour at the same
^1time, so that it matches the background.
^2 Change the pen colour to white, for a change, that's colour 2 in
^2this program.
^4 The next bit is where we'll use the information we've put into the
^4boxes NAME$ and AGE. You should know by now that the command that
^4puts the writing in the correct place on the screen is Locate. This
^4time it's 5,2. To make Amy say hello to you, you use Print. If you
^4put NAME$ after Print "Hello "; when the program is run, the name you
^4typed in earlier will come up on the screen after Hello. The ; tells
^4Amy that something else is to be printed on the same line.
^5 Change the print position to Locate 5,4 and let's print about the
^5age typed in. Again Print is used, this time you are asked, "Do you
^5like being ". To print the age, this is followed by the name of your
^5variable AGE.
^1 At 5,6 we will print "I bet you are looking " and at 5,8 "forward to
^1being"; Here we'll make Amy do a little sum. We want her to add 1 to
^1whatever age is in your variable (box). So after the question, we
^1put AGE+1.
^2 We'd better tell the user to press a key to clean the screen up
^2again remember Cls? We'll ask them to press a key to go on, and tell
^2Amy to wait until this is done by using WAIT KEY
^4 If you'd like to make it do something else, here are 2 new commands
^4for you FOR and NEXT. These are always used together, and are used
^4to create a LOOP. This means that you can tell Amy to do something as
^4many times as you want as simply as possible. You must use a
^4variable to count the number of times that you want to do the task,
^4in this case, we'll call it Z, but it could be any other variable.
^4We want Amy to do something 10 times, that is Z will count from 1 to
^410.
^5 So we say For Z = 1 To 10
^1 Then we'll use Z to decide the print position 10 times, each time it
^1will print in a different place using the Locate command, but the
^1coordinates will be written as Z,Z instead of numbers.
^2 This time we'll print (name) is (AGE) 10 times.
^4 So it will be Print NAME$;" is "AGE
^4 Next Z
^5 Amy will now print the information first at Locate 1,1 then 2,2 and
^5so on until it gets to 10,10.
^1 Then we ask the user to press a key to go on as we did before.
^2 We hope you have been able to follow this lesson, there are more
^2examples of what can be done using the commands you've seen here,
^2just follow the instructions in the listing.
^4 The Commands used this time are:- ^1cls ^2flash off ^1curs off ^2input
^1locate ^2paper ^1pen ^2For Next ^1Print
^6=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
^2 If you would like to enter our great AMOS FOR KIDS competition, go
^2back to the main index, choose the 'OTHER INFO' number, and then
^2COMPETITION NEWS. We hope that everyone will enter, the prize is a
^2copy of PAINT ME A STORY which has been given as a prize by GENISOFT.
^6=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
^1 For those of you who enjoy using DPaint, there are two screens of
^1'stickers' on the disk for you to colour in. Why not grab them as
^1brushes, then put them into a picture that you've drawn? If you
^1enjoy these, let us know so that we can put more on future disks for
^1you to collect.
^6=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
^3@2WE WANT PEN PALS!!@
^6=====================================================================
^2[5 MELANIE TUCKER,[0 ^4age nearly 14, would like a boy or girl to write to
^4age between 13 + 15.
^2[1Interests include[0^1 Amos, Drawing with DPaint, reading, listening to
^1music, collecting stamps and stickers.
^6=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
^2[5BEN TUCKER, [0^1age 11, would like a boy or girl penpal age 9 - 12.
^2[1His main interests are [0^4football, (outdoor & computer) and collecting
^1novelty rubbers.
^6=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
^2[5PHILIPPA TUCKER,[0^6 (known as Pippa) is 8 and would like a British
^6penpal age 7 - 9, boy or girl.
^2[1Pippa likes [0^1 to wear pretty earrings, and collects elephant ornaments
^1and badges.
^6=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
^2 All three can be contacted at:-
^4 1, Penmynydd Road, Penlan, Swansea SA5 7EH.
^6=====================================================================
\