TIB: rand()


[Next][Index][Thread]

TIB: rand()



I am trying to program a random story generator, which will randomly guide the reader through my story. My current debugging program reads as follows:
:test()
:Prgm
:ClrIO
:Request "int",x
:Disp x
:solve(y=rand(x),y)
:Disp y
:EndPrgm
 
I enter integers up to 10, but the program returns y values of 1 every time. On the home screen, when I do rand(5), it generates a number between 1 and 5, with no apparent pattern. Can anyone tell me what I'm doing wrong?
Thanks!
 

Follow-Ups: