3 ms·
> has or in English a different meaning than in code? “Or” in English can mean either exclusive-or or inclusive-or (usually it means the latter), and/or is a m
by dragonwriter 7y ago
> has or in English a different meaning than in code?
“Or” in English can mean either exclusive-or or inclusive-or (usually it means the latter), and/or is a means to specify inclusive-or without ambiguity (the parallel construct for exclusive-or is “X or Y, but not both”) used mostly in contexts where misconstruction can be exotics to the drafter of the text, such as contracts and formal policy documents.
In code, the meaning is already unambiguous; in all languages I am aware, “or” or the symbol referred to in speech with that name (e.g., “||”) is strictly inclusive, and do there is an exclusive-or operator, it is different.