Hi, sorry…maybe I’m just running into syntax issues, but I’m struggling with multiple uses of a a verb for two different object.
So, I have a dial and a switch.
I can TURN DIAL TO 40.
I can TURN SWITCH TO OFF
Dial can be set to 0 to 40. Switch can be set of OFF/ON/STANDBY
Code I have so far is :
[code]A minute dial has a number called a minute. The minute of the minute dial is 0. The minute dial has a number called min setting. The min setting of the minute dial is 0. The minute dial has a number called max setting. The max setting of the minute dial is 60. The description of the minute dial is “Settings are numbered between 1 and 60. The dial is set to [minute of the minute dial].”
A black_switch_setting is a kind of value. The black_switch_settings are off, on and standby.
The black switch has a black_switch_setting. The black_switch_setting of the black switch is off. The description of the black switch is “Settings are labelled off, on and standby. The black switch is currently set to [black_switch_setting of the black switch].”
Instead of turning the minute dial: say “You have to specify a number to turn it to.”
Instead of turning the black switch: say “You have to specify a setting to switch it to.”
Setting the state of it to is an action applying to one thing and one number. Understand “turn [something] to [number]” or “set [something] to [number]” or “adjust [something] to [number]” or “put [something] at [number]” or “crank [something] to [number]” or “switch [something] to [number]” as setting the state of it to.
Check setting the state of it to:
if the noun is the minute dial:
if the number understood < min setting of the minute dial:
instead say “The lowest setting is [min setting of the minute dial].”;
if the number understood > max setting of the minute dial:
instead say “Sorry, the dial can only be set from [min setting of the minute dial] to [max setting of the minute dial].”;
Carry out setting the state of it to:
if the noun is the minute dial:
now the minute of the noun is the number understood;
say “You set the minute dial to [number understood].”;
[/code]
BUT how do I make the Setting the state of it to rule accept both numbers and (in this case black switch values) other values depending on the context WITHOUT needing to differentiate between verbs (i.e. turn,crank, put for dial; set, switch for switches - bearing in mind I will have more than one switch, each with different named settings.)
Sorry to be a pain. Have looked in vain for an example of this.
Ade.