Today’s question is about naming something with a number.
For instance: The 1 is a button.
This does not work. I can easily do this with letters:
The A is a button.
And then I can say “push A” and everything is great. But not so with numbers. In order to get my button-pushing code to work, I need to be able to have the [name] of a numbered button be just the number. Is there a way to get Inform to read “1 Button” as simply “1”? Or to say something like:
if the name of the noun contains a number:
now the name of the noun is the number.
Or to get it to understand only the first character of a button’s name (A Button is just A, 1 Button is just 1)?
I’d avoid naming something simply “A”, which seems like begging for trouble.
So one might start with something like
A button is a kind of thing.
Buttons are usually fixed in place.
A labelled-button is a kind of button.
A labelled-button has a text called the button-label.
A numbered-button is a kind of button.
A numbered-button has a number called the button-number.
Understand the button-number property as describing a numbered-button.
Understand the button-label property as describing a labelled-button.
Pressing is an action applying to one thing.
Understand the command "press" as something new.
Understand "press button/-- [button]" as pressing.
Understand "push button/-- [button]" as pressing.
Before pushing a button, instead try pressing the noun.