I7: Setting conditions in phrases

I7 allows you to create “conditions” for objects, and this is said to be “an even more abbreviated way to create a new kind of value, and at the same time create a property to hold it.” (WI 4.10). For example, quoting from WI 4.10:

In addition to being a quicker way to define a kind of value and a property, conditions also have a very nice attribute that you don’t get with non-condition KOV properties, which is that can be used a bit like an adjective: you can say “The apple is an unripe fruit” to define an apple with that property/condition, for example, instead of “The squishiness of the apple is unripe”.

My problem is that I’d like to be able to allow an author to pass a condition into a phrase as if it were a KOV. Like so:

[code]Test is a room.

A fruit is a kind of thing.

A fruit can be unripened, ripe, overripe, or mushy (this is its squishiness property).
The description of a fruit is “[squishiness] [item described].”

The apple is a fruit in Test.

To set (O - an object) to (S - a squishiness):
now the squishiness of O is S.

Instead of jumping:
set the apple to mushy.[/code].

But this triggers a run-time error about trying to access the squishiness of the nothing non-object. The generated I6 looks OK:

! Request 3: phrase (object, squishiness) -> nothing ! To set ( O - an object ) to ( S - a squishiness ): [ PHR_740_r3 t_0 ! Call parameter 'O' = object t_1 ! Call parameter 'S' = squishiness ; ! phrase 1 ! [1: now the squishiness of o is s] WriteGProperty(OBJECT_TY, t_0,p56_squishiness,t_1); rfalse; ];

…so I can only guess that the “squishiness” being set into the t_1 variable is not what I think it is…? On the other hand, if you change the phrase definition to “To set (O - an object) to (S - a value):”, the same error results. Any ideas what I’m doing wrong?

–Erik

The problem is on the calling side. It’s generating

(PHR_740_r3 (I95_apple,GProperty(OBJECT_TY, self,p56_squishiness)));

The PHR_740_r3 is correct, the first argument is correct, the second argument is some kind of bug. (Note that “self” is unset at this point – that’s where the run-time error comes from.) Report it, I guess.

The way that works is to say:

Squishiness is a kind of value. The squishinesses are unripened, ripe, overripe, or mushy.
A fruit has a squishiness.

This still lets you declare “The apple is an unripened fruit,” but the phrase now works.

Aha! Bug reported: inform7.com/mantis/view.php?id=646

Geez, thanks. I’d forgotten all about that particular syntax!

–Erik