RX0084

Domain: Execution

Error message

%s is not a truth value: %s

In the message, %s marks a value that the engine fills in when it raises the error.

The story

You used and, or, or not on something that is not a truth value. These three operators combine truths, and truths are the words true and false. Nothing else counts. A number has no truth in it by itself. A text does not either. And watch out for a subtle one: a list with true inside it is not true. It is a list that happens to hold a true. In some languages, any of these would be quietly stretched into a yes or a no. Rush never presumes. A number is never read as a truth, because that reading is a convention, and conventions differ from one place to another. So the engine refuses, and shows you the operand as you wrote it and what it actually holds. For example, writing and with a count on one side will land here. The fix is to produce a real truth first: write a comparison, such as the count is greater than zero. Then combine truths with and, or, not, and the logic reads exactly as it says.

Text from the Rush engine's error catalogue.