saying a list of texts using "or"

Quick question: I have a list of texts, and I want to print it out so it reads “A, B or C” rather than “A, B and C”.

Is there already some built-in juju to do this or do I need to do it myself?

Hmm. Complex Listing by Emily Short lets you say a list disjunctively, but I think it has to be a list of objects.

Maybe the quickest way to do this is to tweak the text of the internal response that produces the " and ".

To say (L - list of sayable values) disjunctively: now list writer internal rule response (C) is " or "; say L; now list writer internal rule response (C) is " and ".

If you mess with that response elsewhere you’ll have to be careful (or maybe find another way to do this)–after some fiddling I was not able to find a way to push the current text of that response onto a stack and then reset it after saying L, so I had to specify " and " as the original value. But if you just want the original value I bet it’s fine.

OK, here’s how you can push the response onto the stack:

To say (L - list of sayable values) disjunctively: let temp be the substituted form of "[text of list writer internal rule response (C)]"; now list writer internal rule response (C) is " or "; say L; now list writer internal rule response (C) is temp.

If your original value for the response had substitutions, this is going to freeze them, but if you never put any substitutions into the response you should be good.

And thanks for the nudge; I realize I should use this in my ParserComp entry!

(

Oh, cool.

I don’t fully understand what it does… What kind of beast is “list writer internal rule response ©”?

Well, whatever - it works! Thanks!

It’s a response. (Manual section 14.10.) By default it’s " and ".

Huh. I must have missed that class, but that seems really useful. Thanks, zarf!