Printing out whether something is opened or closed (etc)

Here’s something I’ve been wondering but never got around to figuring out (or asking):

is it possible to print out the value of an unnamed property, like the “open or closed” of a container or door?

Obviously you can work your way around it, using phrases like “[if the door is open]open[otherwise]closed[end if]”, but I’m wondering whether maybe there is some way of printing out the value directly?

I may add: how to suppress the “device is currently switched off” in the device’s description?

I can tell you that one, it’s from the examine devices rule.

To turn it off completely:

the examine devices rule is not listed in any rulebook.

Thanks a lot! That was quick.

It seems there isn’t.

If you define a kind of value that takes a number of named values (’'Colour is a kind of value. The coulours are red, blue, and yellow."), the compiler creates an I6 routines to print “red”, “blue”, and “yellow”, and somehow recognizes the name of the kind “colour”. (This is true even if there are only two values of the kind: “The colours are purplish and pallid”.)

If you create the values without explicitly declaring the kind (“A flower can be red, blue, or yellow”), the compiler will automatically create a kind called “flower condition” (and if need be: “flower condition 2”, “flower condition 3”, …). You can then use the name ‘flower condition’ (etc.) in code.

But this does not pertain to either/or properties (“A flower can be purplish or pallid”). These are compiled to I6 attributes, and, from what I can see, the compiler doesn’t automatically create a routine for printing the names of such a property except as part of the debugging command SHOWME. And most of the properties defined by the Standard Rules are of this kind.

If you want to do this a lot you put the workaround in a special phrase:

To say openness of (C - a container): say "[if C is open]open[otherwise]closed".

Then “[openness of the box]” should work the way you want it to.

Matt, have you been hacking my computer? That’s verbatim what my code looks like, I even call it openness.

Seems like I wasn’t missing anything then.