As far as I understand, executing displayMsg() here should print "Hi. ". And yet, it prints “Hello. Hi.” It prints BOTH, and backwards, for some godforsaken reason. I have no idea why it does either. Moreover, I noticed that I can seemingly put any number inside the msgList[*] and it makes no difference. msgList[1], msgList[2] and msgList[56416816516516] result in the exact same output.
The TADS 3 rand statement will accept a list (or a variable of one). So rand(['Hi. ','Hello. ']) or rand(msgList) will return one the items in the list. TADS 3, when running in debug mode, uses a set seed so the randomization will be the same each run. Which is great for testing.