Now we need some data to fill those arrays with
For q = 0 to max_questions
read question$(q)
read correct(q)
for a = 0 to 3
read answer$(q,a)
next a
next q
rem == Question Data ==
data "What is the capital city of Cuba?",1,"Mexico City","Havana","Bordeaux","Trinidad"
data "Who was the first westerner to climb mount Everest?",2,"Sir Ranulph Fiennes","Sir Michael Caine","Sir Edmund Hillary","Sir Alfred Hitchcock"
You can put data statements anywhere in your program and read the data into single variables or arrays. There is a data pointer that moves along the list every time you read data, you can move this cursor to a label ( eg like_this: ) by using the
restore command.
Now we move on to displaying the questions...
TGC Forum - converting error messages into sarcasm since 2002.