# and/or ?

Is there a way to phrase and/or? I want a definition to apply if one or both values are above a certain threshhold.

Definition: a thing is successful if the strength of it is > 5 or the fortitude of it > 5.

I suspect if both values are above 5, than the definition will return “false”

Is there a way to word this, or should I do a “to decide” phrase?

```to decide if (P - a person) is successful: if the strength of P is > 5: decide yes; if the fortitude of P is > 5: decide yes; decide no.```

By default, “or” in Inform is “inclusive or” (one, or the other, or both, just not neither).

``````Test Chamber is a room.

A person has a number called strength. The strength of a person is usually 6.
A person has a number called fortitude. The fortitude of a person is usually 8.

Definition: a person is successful if the strength of it is greater than 5 or the fortitude of it is greater than 5.

To notify player of success:
say "str [strength of player], fort [fortitude of player]: ";
if the player is successful, say "You are successful!";
otherwise say "You are a loser!"

When play begins:
notify player of success;
now the strength of the player is 4;
notify player of success;
now the fortitude of the player is 1;
notify player of success;
now the strength of the player is 9;
notify player of success;``````

As Draconis says, in Boolean logic (and thus in Inform), “or” means inclusive or (one or the other or both). “xor” (not directly supported by Inform, afaict) means exclusive or (one or the other but not both).

If you do want exclusive or, you can add it back in with this.

```To decide whether (C1 - condition) xor (C2 - condition): (- (({C1}) ~= ({C2})) -).```
But it doesn’t read nicely. Some languages have convenient words for exclusive vs inclusive or; English is not one of them. (Nor, as it happens, is Inform 6.)

Thank you! This narrows down my troubleshooting thicket.