I7: A 'Printed Name' for Value Assignments?

Can a value-state be assigned something analagous to a “printed name” property? Is there a simple way to restate a particular value (as opposed to an overall KOV) for printing purposes other than using a “to say” statement? Consider the following example:

[code]Material is a kind of value. The materials are steel, iron, admantium, aluminum, copper, bronze, brass, gold, silver, lead, cherry-wood, oak-wood, maple-wood, hickory-wood, pine-wood, particle-board, drywall, granite, sandstone, basalt, limestone, cement, concrete, plaster, kevlar, cotton, wool, silk, nylon, rayon, leather, canvas, lpaper, cardboard, tissue, ceramic, glass, crystal, soft-plastic, hard-plastic, rubber, earth, flesh, goo, aether, and oddmaterial. A thing has a material. Understand the material property as referring to the thing. A thing is usually oddmaterial.

Definition: a thing is metallic if its material is steel or its material is iron or its material is admantium or its material is aluminum or its material is copper or its material is bronze or its material is brass or its material is gold or its material is silver or its material is lead.

Understand “metal [thing]” or “metallic [thing]” as a thing when the item described is metallic.

Definition: a thing is wooden if its material is cherry-wood or its material is oak-wood or its material is maple-wood or its material is hickory-wood or its material is pine-wood or its material is particle-board or its material is drywall.

Understand “wood [thing]” or “wooden [thing]” as a thing when the item described is wooden.

The testarea is a room.

A rod is in the testarea. The material of the rod is steel. The description of the rod is “A cylindrical [material] bar, about eight inches long.”

After taking a metallic thing:
say “You pick up the metallic [item described].”

A board is in the testarea. The material of the board is pine-wood. The description of the board is “A 1[’] by 8[’] [material] plank, about six feet long.”

After taking a wooden thing:
say “You pick up the wooden [item described].”.

A placebo is in the testarea. The description of the placebo is “A small object, the size of a button, made of [material].”[/code]
Let’s say I’m not happy with the “material description-style” of the “placebo” item, and would generally rather objects made of “oddmaterial” be described as made of “an unknown substance.”

Of course I could easily make a “to say” substitution, such as:

To say zmaterial for (composee - a thing): unless the material of composee is oddmaterial or the material of composee is aether or the material of composee is goo: say "[material of composee]"; otherwise: say "an unknown substance".
which will work just fine, except that I now have to do more typing for the example item descriptions:

[code]A rod is in the testarea. The material of the rod is steel. The description of the rod is “A cylindrical [zmaterial for the item described] bar, about eight inches long.”

After taking a metallic thing:
say “You pick up the metallic [item described].”

A board is in the testarea. The material of the board is pine-wood. The description of the board is “A 1[’] by 8[’] [zmaterial for the item described] plank, about six feet long.”

After taking a wooden thing:
say “You pick up the wooden [item described].”.

A placebo is in the testarea. The description of the placebo is “A small object, the size of a button, made of [zmaterial for the item described].”[/code]
As a simple matter of convenience it’s less effort to type “[material]” as opposed to “[zmaterial of the item described]” in these cases, but that would require some method for assigning “an unknown material” as the printed name of “oddmaterial.”

Is there a way to achieve this narrow effect which requires less overall effort than using the “to say” substitution? It would be nice if one could simply say something equivalent to:

Rule for printing the [????] of oddmaterial: say "an unknown substance."
Thanks.

No.

Well, the rule for printing the name of something stuff ultimately uses a say phrase in there anyway, so it’s say phrases or nothing. But to answer your question, yes: [code]“test” by Ron Newcomb

Material is a kind of value. The materials are steel, iron, admantium, aluminum, copper, bronze, brass, gold, silver, lead, cherry-wood, oak-wood, maple-wood, hickory-wood, pine-wood, particle-board, drywall, granite, sandstone, basalt, limestone, cement, concrete, plaster, kevlar, cotton, wool, silk, nylon, rayon, leather, canvas, lpaper, cardboard, tissue, ceramic, glass, crystal, soft-plastic, hard-plastic, rubber, earth, flesh, goo, aether, and oddmaterial. A thing has a material. Understand the material property as referring to the thing. A thing is usually oddmaterial.

To say (X - material): if X is oddmaterial, say “an unknown substance”; otherwise say X.

When play begins:
repeat with X running through materials:
say “.”

Spot is room.[/code]That doesn’t look like it should work but it does. Whether I’m exploiting a bug or not is anyone’s guess.

Well there’s a bug. This works just fine: [code]“test” by Ron Newcomb

Material is a kind of value. The materials are steel, iron, and oddmaterial.

To say (X - oddmaterial): say “an unknown substance”.

When play begins:
repeat with X running through materials:
say “[X].”

Spot is room.[/code]But that didn’t work in the earlier example because, according to the generated I6, I7 had interpreted oddmaterial as an object rather than a kind of value. The line “A thing has a material.” seems to break I7 somehow. But it works if you use “A thing has a material called make.”

I’ll submit a bug report. The example in this post should be all that’s required.

(Tested all this on Windows 6E72.)

Sorry about the unwarranted pessimism. I didn’t realize the compiler could handle the “To say X … say X” logic.

@zarf

No problem, thanks. I was fairly pessimistic about a solution as well, but figured one never knows until one asks.

@Ron

Thanks. That’s an interesting find on the unexpectedly legal (to me) generic use of “to say.” If there’s an underlying problem involving I6 stuff it wouldn’t do any good to try explaining it to me in detail since I don’t comprehend I6 stuff, but I read your second post as saying I needed to assign the “material” kind of value to things with the alternate method “A thing has a material called…” However under some circumstances this doesn’t seem to work in item descriptions, unless I’ve misunderstood you. For example:

[code]Basematerial is a kind of value. The basematerials are steel, iron, cherry-wood, pine-wood, and oddmaterial. A thing has a basematerial called material. Understand the material property as referring to the thing. The material of a thing is usually oddmaterial.

To say (valword - oddmaterial): say “an unknown substance”.

Definition: a thing is metallic if its material is steel or its material is iron.

Understand “metal [thing]” or “metallic [thing]” as a thing when the item described is metallic.

Definition: a thing is wooden if its material is cherry-wood or its material is pine-wood.

Understand “wood [thing]” or “wooden [thing]” as a thing when the item described is wooden.

The testarea is a room.

A rod is in the testarea. The material of the rod is steel. The description of the rod is “A cylindrical [material] bar, about eight inches long.”

After taking a metallic thing:
say “You pick up the metallic [item described].”

A board is in the testarea. The material of the board is pine-wood. The description of the board is “A 1[‘] by 8[’] [material] plank, about six feet long.”

After taking a wooden thing:
say “You pick up the wooden [item described].”.

A placebo is in the testarea. The description of the placebo is “A small object, the size of a button, made of [material].”[/code]
The above code provides the output:

The description of the placebo item, in that case, isn’t working as intended.

On the other hand (unexpectedly after the failure of the first example), the following does give the desired output:

[code]Basematerial is a kind of value. The basematerials are steel, iron, cherry-wood, pine-wood, and oddmaterial. A thing has a basematerial called material. Understand the material property as referring to the thing. The material of a thing is usually oddmaterial.

To say (valword - oddmaterial): say “an unknown substance”.

Definition: a thing is metallic if its material is steel or its material is iron.

Understand “metal [thing]” or “metallic [thing]” as a thing when the item described is metallic.

Definition: a thing is wooden if its material is cherry-wood or its material is pine-wood.

Understand “wood [thing]” or “wooden [thing]” as a thing when the item described is wooden.

The testarea is a room.

A thing has some text called the descriptor.

The description of a thing is usually “[descriptor of the item described][paragraph break][The item described] is made of [material of the item described].”

A rod is in the testarea. The material of the rod is steel. The descriptor of the rod is “A cylindrical bar, about eight inches long.”

After taking a metallic thing:
say “You pick up the metallic [item described].”

A board is in the testarea. The material of the board is pine-wood. The descriptor of the board is “A 1[‘] by 8[’] plank, about six feet long.”

After taking a wooden thing:
say “You pick up the wooden [item described].”.

A placebo is in the testarea. The descriptor of the placebo is “A small object, the size of a button.”[/code]
resulting in:

Would this variance/success (compared to the first example) be explained by the bug you found, or is it a separate problem?

Thanks as well for filing a bug report on the assignment of a kind of value, as I likely wouldn’t have been able to either define or articulate the problem (since I don’t know much about the I6 stuff, and honestly am not very interested in learning about I6 stuff unless absolutely necessary).

I believe the way it works is (1) for an ambiguous call in an overloaded phrase definition, I7 will always try to resolve it as a call to a different overload rather than a recursive call to the one you’re defining, and (2) when you replace a phrase like this, you’re just defining a new overload that happens to be identical to an existing one, and I7 prefers it because it was defined later.

Change this line: A placebo is in the testarea. The description of the placebo is "A small object, the size of a button, made of [material]." to this A placebo is in the testarea. The description of the placebo is "A small object, the size of a button, made of [material of the item described]." and your first example will function like your second example.

@Jesse: very interesting, that.

@ vaporware

Thanks. Your observation actually explains a number of other odd things I’ve seen at various times, as I seem to have a natural talent for writing I7 code that relies heavily on ambiguous calls in overloaded phrase definitions. :slight_smile:

@ Ron

Thanks. If you hadn’t found a hidden problem/bug in the assignment of KOVs, I might have stuck with my first example (“To say zmaterial for (composee - a thing)…”) in this case as the original goal was simply to save a few words’ wear on my keyboard. In light of your comments though, I think the prudent course is to proceed ahead from my second example (as modified by your lastest post) as that approach will be generally helpful in a number of ways I’ll not bore everyone by detailing here. My third example, although it works fine, begins to creep too far for comfort away from my goal of simplifying my project by taking advantage of new features in 6Z72.