Is there a way of storing a more complicated expression in a property (a token? a list? some sort of “foo/bar” string?) and using that “as describing” something so you can use more than a single verbatim text? Let me show you what I’m trying to do:
Dublin is a room.
A knowable man is a kind of man. A person has an indexed text called the real name. Understand the real name property as describing the knowable man.
Steve is a knowable man in Dublin. The real name of Steve is "Stephen Daedalus". The printed name of Steve is "man". He is not proper-named. Understand "man" as Steve.
test me with "x man / x stephen daedalus / x stephen / x daedalus"
This will give you
I’d like to have “stephen”, “stephen daedalus” and “daedalus” all to be understood as out man steve here.
This is of course not a complete example - what I’m actually trying to achieve is NPCs who will introduce themselves properly, and only after that will you know their names. I guess you can do this with “Understand … as … when” type phrases but I’m trying to do it with a property so I can do things in a more reusable way.
Does my question even make sense?
I suspect (once again) what I really should do is just stop trying to coerce I7 into behaving like other programming languages.
A person can be knowable. Understand the knowable property as describing a person.
Steve is a knowable man in Dublin. Understand “Stephen/Daedalus” as knowable when the item described is Steve. The printed name of Steve is “one man”. He is not proper-named. Understand “one/man” as Steve.
Flann is a knowable man in Dublin. Understand “Flann/O’Brien” as knowable when the item described is Flann. The printed name of Flann is “other man”. He is not proper-named. Understand “other/man” as Flann.
test me with “x man / x stephen daedalus / x stephen / x daedalus / X Flann / x O’Brien / x Flann O’Brien”[/code]
Understand "Flann/O'Brien" as knowable when the item described is Flann.
The straightforward “Understand” method would be:
Understand "Flann/O'Brien" as Flann when Flann is knowable.
Purely a matter of taste, I’d say.
Another way, using properties:
FlannO is a person.
SteveD is a person.
Real name is a kind of value. The real names are nameless, Flann-name, and Steve-name.
A person has a real name. A person is usually nameless.
Understand the real name property as describing a person.
Understand "Stephen", "Daedalus" as Steve-name.
Understand "Flann", "O'Brien" as Flann-name.
now FlannO is Flann-name.
now SteveD is Steve-name.
You’d also want printed-name rules, of course.
(I made the object name “FlannO” to avoid conflict with the value name “Flann”. If both contain “Flann”, the parser will parse correctly, but it will print unnecessary “(…)” clarifications. You could probably work around this with privately-named, instead.)