I can't seem to get this program to work I am not too familiar with randomizing with strings. I have done it several times with numbers. How can I make this work.
Dim Answers$ (1 to 8)
RANDOMIZE -TIMER
CLS
OPEN "reply.txt" FOR OUTPUT AS #1
WRITE #1 Yes
WRITE #1 seldom
WRITE #1 maybe
WRITE #1 never
WRITE #1 always
WRITE #1 sometimes
WRITE #1 no
WRITE #1 not anytime soon
CLOSE #1
OPEN "reply.txt" FOR OUTPUT AS #1
count = 0
DO WHILE NOT EOF(1)
count = count + 1
Answers$ = INT(RND * count) + 1
LOOP
CLOSE #1
END
I'd appreciate any suggestions.
Thanks
Dim Answers$ (1 to 8)
RANDOMIZE -TIMER
CLS
OPEN "reply.txt" FOR OUTPUT AS #1
WRITE #1 Yes
WRITE #1 seldom
WRITE #1 maybe
WRITE #1 never
WRITE #1 always
WRITE #1 sometimes
WRITE #1 no
WRITE #1 not anytime soon
CLOSE #1
OPEN "reply.txt" FOR OUTPUT AS #1
count = 0
DO WHILE NOT EOF(1)
count = count + 1
Answers$ = INT(RND * count) + 1
LOOP
CLOSE #1
END
I'd appreciate any suggestions.
Thanks