OT: Syntax for if/then statement
Steve Rickaby
srickaby at wordmongers.demon.co.uk
Thu Jun 29 10:47:56 PDT 2006
At 11:22 -0600 29/6/06, Tammy.VanBoening at jeppesen.com wrote:
>Our new editor wants to add the word "and" to such statements - if <blah, blah>, AND then <blah, blah>. Both I and the other writer disagree with the editor on this one - it should be just if/then - no "and."
Boy are you going to have fun with your new editor.
If/then and If/then/else or If/then/eiseif/else have been the constructs in any programming language that I can remember working in. 'If/and then' introduces an element of confusion, as if the 'and' clause is a second 'if' condition, as in 'If A happens and then B, then C happens'. In hardware logic, this is the logic of an AND gate, which has the truth table:
A B Out
0 0 0
0 1 0
1 0 0
1 1 1
In other words, the output is only high if inputs A and B are high. What you want is the logic of a Yes gate (I just made that up), i.e. a straight piece of wire:
Input Output
0 0
1 1
I.e. If input high, then output high.
Even more, 'if/and then' introduces a misleading temporal element, as if the result only occurs if the second condition occurred after the first.
What's his/her background? Cleanly not electronics or programming. Or editing, for that matter.
For references, just use the formal definitions of any high-level programming language, plus a good grammar book. If that's not enough, search in the works of any of the major professional communicators (Tufte?)
--
Steve
More information about the framers
mailing list