Take the 2-minute tour ×
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It's 100% free, no registration required.

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.

share|improve this question

3 Answers 3

up vote 6 down vote accepted

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

share|improve this answer
    
or perhaps "when any" rather than "if any" as you are speaking of events. –  Mark Schultheiss Mar 15 '11 at 16:45

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.

share|improve this answer
    
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).)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.