I'm writing a program that generates playlists from a large pool of mp3 files. The program can keep track of total playing time, number of tracks and total size of the files, and can be given upper limits on each of the three.

What I want to make clear in the documentation is that even though any combination of the three limits may be specified, the program will quit after any one of them is reached. Effectively, it treats them as though they were specified with the boolean "OR" operator. Is there a programming term to describe this? My uneducated guess would be to use "the conditions are treated disjunctively" i.e. the logical operation of disjunction is performed on them, but I don't know if this is accepted (or, for that matter, existing) terminology.


I would simply write it in plain English, with any: “the program will exit if any of the three conditions is triggered”.

  • or perhaps "when any" rather than "if any" as you are speaking of events. – Mark Schultheiss Mar 15 '11 at 16:45
  • The subject-verb agreement in the case of any (or all) needs to agree with what the word is applied to. In this case "... if any of the conditions are triggered." See here for reference. – Octopus Oct 19 '18 at 19:41

Usually the way this is written is to list the conditions that trigger an event, and add "whichever comes first":

The game ends when all other players go bankrupt, one player reaches $1,000, or the time limit has been reached, whichever comes first.

  • I thought of this, but it could be confusing since all three conditions are optional (if no limits are specified, the entire pool is included in the playlist). – user6130 Mar 15 '11 at 14:20
  • If all three conditions are optional, you should use "if" instead of "when". (And to make things completely clear, you could add "if none of these occurs ...".) – Peter Shor Mar 15 '11 at 22:49

“Exclusive OR”. (Latin) “aut” (inclusive OR) vs “vel” (exclusive OR). An “inclusive OR” requires all the conditions; an “exclusive OR” requires only one.

Note: a “sufficient condition” is a condition that… is sufficient — that counts — regardless of whether or not any other conditions obtain. (The converse is “necessary condition”; the former is ( a -> b ); the latter is ( -a -> -b).)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy