Pronoun substitutions in text

Okay, I feel like a complete dork because this is so basic and relevant to IF that I know it HAS to be part of Inform, I just can’t seem to find any reference or information on it. How do you do a text substitution to print a pronoun for a noun?

I want to build a text that looks something like this

This text should work with male and female characters, so I need text substitution, so ideally I would write something like this

I look at [the noun] and point at [him-her for the noun].

Sadly there is no [him-her] rule and none of my tries to shuffle things and try different ways have yielded any results, so I was wondering if anyone could tell me how to properly do this? I know I could easily implement the necessary rules myself, but I can’t believe the Inform does not have something like this built in.

Thank you so much!

If you’re using 6L, then [them] should work. See section 14.5 of Writing with Inform, “Adapting Text Referring to Other Things.”

Yeah, it’s not in there. All sorts of other things but no pronouns like “him”, “her,” or “them.” No matter I’ve implemented what I needed myself. In case anyone needs it, here’s the code

[code]To say him-her for (P - a person):
if P acts plural:
say “them”;
if P is female:
say “her”;
say “him”.

To say he-she for (P - a person):
if P acts plural:
say “they”;
if P is female:
say “she”;
say “he”.

Hmm. What version of Inform are you using?

I’m running the latest version - Inform (1.53/6.33/6L38)

With the latest version, [them] is built in and should be substituted correctly. [Them] is mentioned in 14.5 of the most recent version of Writing with Inform, too. Maybe your Inform7 didn’t update correctly. Weird.

For reference if you get the built-in version working or if someone else comes looking, the normal way to use [them] in 6L38 is like this:

Before examining someone:
	say "I stare at [the noun], examining [them] thoroughly."

If you’re not referencing the pointed-at person with [the noun], Inform needs to know who:

Before examining someone:
    say "I examine [regarding the noun][them] thoroughly.".

Doh! I can’t believe I did not see that. The concept of plural pronouns as a default still feels unusual to me but I’m sure I’ll get used to it.
Thanks for the guidance.

It does seem strange, but in English the plural has more distinct forms than any gender of the singular.

Plural: they their theirs them
Masculine: he his his him
Feminine: she her hers her
Neuter: it its its it

The plural is the only one which distinguishes all four cases.