Truncating trailing punctuation

I got a bug report for Frotz:

Running zork1.z3

[code]>WHAT IS A GRUE?
I don’t know the word “grue?”.

WHAT IS A GRUE
The grue is a sinister, lurking presence in the dark places of the earth. Its
favorite diet is adventurers, but its insatiable appetite is tempered by its
fear of light. No grue has ever been seen by the light of day, and few have
survived its fearsome jaws to tell the tale.
[/code]

So, I did a quickie survey of terps to see how this was handled. Everything based on Frotz passes the question mark along to the Zcode whereupon it returns “I don’t know the word “xxxx?”.”. So does Fizmo and Rezrov. Jzip and Infocom’s original interpreter strip the trailing question mark. Arguably the correct behavior is to strip the trailing mark, given that’s how Infocom did it. Can anyone shed any light on why and how interpreters started to not strip trailing punctuation?

A remark in the standard (section 13) says:

I can’t offer an explanation for it, but I assume there must be one.

Are you saying that Frotz is behaving correctly?

I’m combing through jzip’s source code and I can’t find where the question mark is being truncated.

It’s quite possible that Infocom never needed to use punctuation but at some point it was decided that Inform users should have that power/flexibility if they so chose. I’d tend to agree with that assessment, even if it goes against the Infocom standard (we’ve sort of evolved from that. Who knows what Infocom would be using if they were around today? I doubt they’d be clinging to their old standard).

I suppose the solution to this is to survey the Infocom games to see which ones have a WHAT command and have Frotz truncate trailing question marks only for those games. Frotz already takes into account deviations Infocom made from what we now consider the standard. Perhaps this should be yet another.

I think what I said in my last post was silly. The bit Dannii quoted clearly refers to “some of [their] interpreters”. It probably was a bit messy on their end, because most people didn’t use punctuation so the issue never really arose.

“Arthur” doesn’t care if it has a question mark or not (tested by loading a savegame and, in the presence of Thomas, typing “THOMAS, WHAT IS THOMAS”
and “THOMAS, WHAT IS THOMAS?”). Zork (Dungeon) definitely cares. So somewhere along the code, Infocom themselves started taking it into account.

“A Mind Forever Voyaging” does care about the punctuation. “What am I” is valid, “What am I?” is not.

In “Sherlock”, “what am I” seems to yield the same result as “what am I?”.

In Zork Zero, same as above.

So maybe the interpreter shouldn’t worry about it. There’s some inconsistency here, but it seems to be the games’ responsibility.

I’m working on some test code to implement “WHAT IS A SWORD” and such to account for question marks. Clearly that’s the responsibility of the game to get it right, but Infocom appears to have taken the easy and messy way out by diddling with the interpreter. I’m going to replicate the same diddling on just the games that need it.

I’m completely out of time now, but I can easily check it out on the games themselves. But I don’t have every version of every game - and some games I only have the SOLID GOLD editions for - so it might or might not be of much use. But if you want me to check it out, just say the word, and I’ll do it tonight. Shouldn’t take too long.

I already checked over all the games that were on the Lost Treasures CDs and version 59 of Leather Goddesses of Phobos. Tomorrow I plan to go through the patches at ifarchive.org/indexes/if-arc … tches.html and note what’s needed. I don’t think I’ll find much variation of this trait.

I’m in favor of this approach.

Fixed.