How does "other" work exactly?

Could somebody explain how “other” works in the (I6, but maybe I7 too?) library?

In the DM4 I find “Thus, if the player is holding a sword in a room where there’s also a sword on the floor, then ‘‘examine other sword’’ would refer to the one on the floor.”. This implies that the parser refers to the one you’re holding when you simply type ‘examine sword’ ? (otherwise I really don’t understand what other is used for)

However, if I try with lib 6/12 (serial 140724), with

[spoiler][code]
Constant STORY “Testing the lib”;

Include “parser.h”;
Include “verblib.h”;
Include “grammar.h”;

[ Initialise;
location = theroom;
move swordone to player;
];

Object theroom “The Room”
with description “You’re in a nondescript room.”,
has light;

Object swordone “sword 1”
with description “sword 1”,
name ‘sword’,
has ;

Object swordtwo “sword 2” theroom
with description “sword 2”,
name ‘sword’,
has edible;
[/code][/spoiler]

x sword gives me “sword 2” (adjudicate: 676 vs 656), which surprises me (I thought the parser gave priority to the objects you had in your inventory, but I don’t know where I get that from). And >x other sword gives exactly the same thing (with the adjudicates etc). “>x my sword” gives the first one.

I don’t really understand why adjudicate gives the same score when the indeftype is ‘other’ - this should be enough to decide, no? Maybe? I don’t know what to think.

Could somebody give me a clear short example that highlights a case where “other” makes a difference with the current librairies? Thanks for your help, and sorry if this is a dumb question.

In both I6 and I7, “other” has no effect – it’s treated basically the same as “a”. (That is, EXAMINE OTHER SWORD is like EXAMINE A SWORD; it will pick a sword rather than going to disambiguation.)

There’s commented-out code which looks like it’s meant to bias against it_obj. That is, it seems like in some earlier version of I6, “other” would prefer objects which are not the current he/she/it pronoun target. But this has been commented out for a long time (before library 6/11 certainly), and it may not have ever worked.

I see - thanks zarf!

I came across the same question, when I tried x other (can’t remember why), so using other without any noun.

The funny thing is that it seems to make a preference: if the player wears something, other is interpreted as the wearable thing, otherwise the first thing that was defined for the room.

Lab is a room.

The lamp is furniture in the Lab. 
The camp bed is furniture in the Lab.

x other produces the following for this example:

>x other
(the lamp)
You see nothing special about the lamp.

But if there is a wearable thing, that takes precedence over the lamp:

Lab is a room.

The lamp is furniture in the Lab. 
The camp bed is furniture in the Lab.

The jacket is a wearable thing. The player wears the jacket.

Produces with x other:

>x other
(the jacket)
You see nothing special about the jacket