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, msgList and msgList 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.