roremaad kaši pa rabmo da ka DO zn io soo SEA | HI se psi Giving the computer information To make the computer do something more useful than just displaying things on the screen you have to give it information or "data' to workon The computer stores this information in its memory until you tellit to useit Another way l0 READ A You a aa na —— correct oflabel 20 READ B for numbers and 40 DATA6,231, FRIDAY Commas These are the numbers to bestoredin the computer's memory. Some computers need their data words in guotes. Another way to store information is with When you run the program the These are the the words READ and DATA, as shown computer puts each piece of data ina labels for the above. The READ lines tell the computer memory space, taking them in order. The emory spaces. to label memory spaces and the DATA items of data must have commas in line contains the information. between so the computer knows how long When you puta piece of data intothe can use the word LET, as shown above. A | Some programs each one is." computer s memory you have to giveita labelled memory space is calleda label so you can find it again. You canuse vanable because it can hold different data letters of the alphabet as labels. To labela at different umes in the program. memory space and put a number in it you Ouotes — 10 LET A$<"ROBOTS ARE GREAT" 20 LET B$-"IF YOU LIKE" 30 LET C$<"GREAT METAL IDIOTS"' 40 PRINT A$ 50 PRINT B$ 60 PRINT C$ k 70 END RUN - Here are two programs, one using READ ROBOTS ARE GREAT Don'tforget and DATA and the other using LET to IF YOU LIKE guotation marks. store information in the computer s GREAT METAL IDIOTS You use a different kind of label to store You put a string in a memory space s letters and symbols in memory spaces. using LET in the same way as for anumber More about variables You cannot use these Letters and symbols are called "strings" variable, but the letters and symbols must words as variable label and you use letters of the alphabet with be enclosed in guotation marks, as shown asthey contain dollar signs to label them, e.g. C$." above. BASIC words. — IMOILM— nn inova are labelled o inthe called a string variable. The contents of | | | Computer s memory where informationis variables can change during the times g am. k Mm dra mom ... mai aa Soil: saga ega i stored. A variable containing numbersis Somecomputers can use words sa ikilale | zma ne nes k kdo leg z dotgčaa information. The data in called a number variable and one (or variables, but not words which contain which contains letters and symbols is BASIC words as this would confuse the computer. program prints out the information from the variables stays the same until you ' variables B, D$ and L$. change it. "You cannot use this method on the ZXB1 computer. "This is pronounced "C dollar" or "C string". Nana. amena mid Se JE MR vx "PE « TETI !