Random text, from a table

I love all the tags that allow different kinds of randomness for text, but if I put that text into a table instead of using the [or] construct, it seems like the only random I can do is “choose a random row”.

What if I wanted to have random text from a table but random as in [in random order], that is, “A random order is chosen for the alternative passages of text, and they are used in that order as the text is printed again and again. When one random cycle finishes, a new one begins.”?

– Peter

One way is, before you start selecting, sort the table in random order (sort table name in random order). Keep a pointer to the row you’re on, and when you hit the last row, sort it again.

OK, That did the trick. Randomized the table on entry, used an incrementing sequence variable, then ran through items as they were discovered, checking

if qsequence > number of filled rows in Table 1.1: now qsequence is 1;

To make sure I don’t blow up and run-time error when the table hits a blank row.

Thanks much.