This came up in the Plurality thread, so I did a quick implementation. The patch is in my I6 work branch:
I wound up supporting three forms of the directive:
Dictionary ‘word’ val1;
Dictionary ‘word’ val1 val3;
The first just adds the word to the dictionary, with all flags set to zero, if it’s not already in the dictionary. (It was not previously possible to create a dict entry with all zero flags.)
The second form adds the word, and also sets the dict_par1 flag to the given value. If the word already exists, the value is bitwise-or’ed with the dict_par1 flags. (So you can set flags this way, but not clear them.) The third form does all that and also sets (or bitwise-ors) the dict_par3 flags.
(I didn’t include a way to set dict_par2, because that’s reserved for the verb number, as generated by Verb declarations. There’s no sensible way to merge user values with the grammar’s value.)
As an example:
Dictionary ‘oxen’ 4;
…sets the plural-word flag for ‘oxen’. This has exactly the same effect as using the literal ‘oxen//p’ in I6 code.
The flag values can be 0-255 in Z-code, 0-65535 in Glulx.
It turns out that in dict_par1, only bits 4 and 5 are completely unused. (In Glulx, you also have bits 8-15 to play with.) If you write an I6 program without using the Verb or Extend declarations at all, then bits 0, 1, 3, 6 will never be set, so you could use those too. On the other hand, bit 7 is essentially useless, because it’s set for any word which is mentioned in code – you’d have to do a lot of dancing to make use of a word that doesn’t have bit 7 set.
I6 unit test and demo for the new directive: