Re: A89: Random number help, tables


[Prev][Next][Index][Thread]

Re: A89: Random number help, tables




In a message dated 4/11/99 5:41:20 AM Eastern Daylight Time, 
oh@hem.passagen.se writes:

<< I agree. That would be more efficient, specially with a lot of 
question-answer
 sets, and cleaner code.
 have all questions saved after each other, with the answers right after each 
q.
 Then have a little table where you store the addresses of all the questions.
 if you want question 5, pick out the fifth entry in the table, read the q 
until
 you hit 0, then read in the answers. If you want different amount of answers 
to
 each question, put in a little byte here telling how many answers to read.
 
 If you build it up like this, it is very easy to add new questions, just put
 them in, expand the table by one entry and increase the range of the
 randomfunction.
 
 //olle >>

well basically,  i have no idea what that means.  =)  i want it to choose a 
random question and somehow ill make sure it doesn't pick the same question 
twice, and there will be 4 answers for each question.  but i don't know how 
to use tables?  how do you do that?