Setting named properties with "now"

Is this possible?

[code]Ordinal is a kind of value. The ordinals are unordered, first, second, and third.

A thing has an ordinal called order.

After reading a command:
Now the order of every thing is unordered.[/code]
I think I’ve also tried “now every thing is unordered” and “now every thing has order unordered,” but those don’t work either. Since “now” works for anonymous boolean properties, I always expect it to work for named properties, but as far as I know, it doesn’t. Am I wrong?

I think if you change A thing has an ordinal called order. to A thing has an ordinal. then it would work? Or maybe A thing can be unordered, first, second, or third. But I don’t think you can do what you were trying.

I think you’re right.

You can of course make it work for multivalue anonymous properties too. (That is, if you just said “A thing has an ordinal,” it would be easy.) But for a named property, I don’t see a way to write the condition.

I thought you couldn’t give things an anonymous KOV property, but it looks like you can, as long as you give them the property before you refer to it in the source. Otherwise you get a compiler error. Thanks for the tip, Ron!

This is weirdly related to the “offstage” problem mentioned in another thread. One of my tries was to say:

Definition: a thing is zorkulate if the ordinal of it is unordered.

This makes a testable condition (you could say “if every thing is zorkulate”) but it’s not a settable condition (“now every thing is zorkulate” produces an error). Similarly, it would be nice to be able to say

Definition: a thing is offstage if it is off-stage.

But again, this is not a settable condition.

Clearly it’s a hard problem to sort through such definitions and figure out which ones could be settable – most aren’t. But if the compiler were able to figure that out, it would be awfully handy.

I’m imagining how it might work if you could, using relations. Something weird like “now every order that relates to a thing by the property relation…” or maybe “now every order property…”

If you use an anonymous property, can you still declare that the property describes or refers to a thing?

You can do this by dipping into I6. See 25.23, “Inform 6 adjectives”, in the manual and the “makes it so” syntax. The I6 routine you write would obviously set the location or whatever that off-stage would do.

This works:

[code]ordinal is a kind of value.
the ordinals are unordered, first, second, and third.
a thing has an ordinal called order.

After reading a command:
repeat with x running through every thing:
now the order of x is unordered.
[/code]

… though I’m not sure if this is how you want to do that.

That’s how I’m doing it now. It’s probably no less efficient, but I don’t like the way it looks.

Here’s another way to do it:

[code]A thing has an ordinal called order.
The verb to have order (it has order) implies the order property.

After reading a command:
now every thing has order unordered.[/code]

1 Like

That’s awesome! Thanks!

Yes, I had missed that declaration too. (Or forgotten it, since I managed to index it, but in a confusing manner. Will improve that.)

Thanks.