[I7] Lists with commas (SOLVED - I guess)

Hello again!

Promise I won’t bore you anymore.

How can I list things with only commas and no “and”?

Check: [list of things carried by the player] removes the article, but not the conjunction.
Is there a way to have BAG, ROPE, DRESS instead of BAG, ROPE AND DRESS?

I know, I’m taking Inform back a thousand years… :slight_smile:

Take a look at chapter 21. It seems you could make a new list out of “the list of things carried by the player”…I think you can then manipulate the list differently.

I don’t supposed it’d work doing

repeat with item running through the list of things carried by the player: say "[item], [no line break]; next; say ".".

If you want to remove “and” from every list you could change list writer internal rule response © from " and " to “”, I think.

That is:

List writer internal rule response (C) is "".

Don’t forget to use the serial comma!

Hmmm, isn’t that what the serialised comma option is for?

Nope, thats for printing a comma BEFORE the “and”, I think.

matt’s suggestion works, although you have to add a [space] between quotes (" ").

I will try working on Hanon’s suggestion too, as it seems less general, so less risky.

Thanks for now.

Try the extension Complex Listing by Emily Short. It gives you full control over the list writer for things like this.

Thanks a lot, Draconis.

Up to now, the quicker solution seems to be:

List writer internal rule response (C) is ", ".

I hardwire the comma so to show when just 2 objects are listed. I don’t use serial comma.