Version 23 of then

Updated 2007-06-01 11:03:04 by wdb

Optional argument of if. It's usually good style to omit the then itself, but can aid clarity when using multi-line expressions. Compare with else.

 if {$some_long_and_complex_condition
     && $some_other_condition_making_it_even_longer
 } then {
      # do the right thing here
 } else {
      # do the other right thing here
 }

wdb In my humble opinion, clarity matters always, such that I personally count the usage of then to the list of good style. But, of course, that's my personal taste. I suppose that usage of then does not impact the perfomance.


Category Command | Category Control Structure