letter case for definite articles

I have a narrator who likes to shout in all caps, so I have this little bit of code to print noun substitutions in capital letters.

rule for printing the name of a thing (called the named):
	let P be "[printed name of the named]" in upper case;
	say P;

This is working fine for me. However, sometimes there is a disconnect because I can only print the article in lower case or with a capitalized first letter.

instead of jumping:
	say "HAND ME [THE ball].";

yields

>jump
HAND ME The BALL

This isn’t a huge deal, but I’ve become curious. Is there a way to manipulate the definite article further?

To say cap-the (named - a thing):
    let P be "[the named]" in upper case;
    say P.
1 Like

That is code that works, yes! Thanks for that. But I was asking specifically about Inform’s built-in functionality for handling definite and indefinite articles in substitutions.

One reason is sheer laziness; I don’t want to add more characters to every noun in a description. In a 200k-word work, this will add up! Another reason is that it will be too easy to miss one here or there, or else lose track of what I’m doing.

EDIT: the built-in functionality also checks for proper-named things.

I also am wondering for the sake of my own edification.

My guess is that there is no easy way to mess with this, but I thought I’d ask.

This code will also handle proper-named things, since it invokes the built-in “the (object)” predicate, but I see your point.

Unfortunately, there is no built-in text substitution for printing a definite article in all capitals. You’d have to define it yourself.

1 Like

OK! Thanks for clearing that up.

What? You know you can just write it like this, right? Phrases are conditionally case-sensitive.

To say THE (named - a thing):
    let P be "[the named]" in upper case;
    say P.

…though this does lead me to wonder what happens if you define The (thing) and the (thing) and THE (thing) and then call tHe (thing)… but who would do that anyway?

1 Like

I couldn’t remember off the top of my head if they were still “partially case-sensitive” like in I6 (where only the first letter is case-sensitive), and didn’t want to open Borogove to check :face_with_tongue:

Hmm, I think the only cases I’ve actually used case-sensitivity was in the first letter… but I seem to recall that the documentation implied they are fully case-sensitive.

This is not what I would have guessed! Perfect for when I’m mashing the caps lock