Setting variables in "to say" phrases?

It’s possible, I think, to use say phrases to do things besides printing text, like this:

Lab is a room. The thingy is a thing in Lab. The button is a thing in Lab. A thing can be activated or inactivated. A thing is usually inactivated. Instead of pushing the button, say "You push the button. [activate thingy][line break]". To say activate thingy: Now the thingy is activated.

Is it possible to pass a variable into this kind of say-phrase? Something like,

Instead of pushing something, say "You push [the noun]. [activate [noun]][line break].

I don’t think that’ll work, but is there any way to do something like it?

This is certainly bad code – I’m just trying to see how much can be done with say-phrases, because I’m working on something that will proceed almost entirely by reading quips from tables.

Sure it’s possible. When you do

    say "[The noun]...";

…that is a say phrase with a variable.

In your case:

To say activate (T - thing): 
    now T is lit.
	
Instead of pushing:
    say "[activate noun]You whack [the noun]."

[smacks forehead]

That seems like something I should’ve known. Thank you.