'Clairvoyant - PZH705
'Fortune telling in Small Basic
'Example tutorial in how to access arrays.
'There are different ways to access arrays depending upon the codes.
'You can put this in one line if you're willing to string the text together
'and do proper calculation.
'
Init:
A[1]="It is certain"
A[2]="Yes - definitely"
A[3]="Most likely"
A[4]="Outlook good"
A[5]="Yes"
A[6]="Reply hazy"
A[7]="My reply is no"
A[8]="Outlook not so good"
A[9]="Very doubtful"
A_length=Array.GetItemCount(A)
NL=Text.GetCharacter(13)+Text.GetCharacter(10) 'newline
Loop:
TextWindow.Write(("What is your Yes/No Question? "+ NL))
TextWindow.Read()
TextWindow.WriteLine((A[Math.GetRandomNumber(A_length)]+NL+NL))
Goto Loop
No comments:
Post a Comment