rik(_at_)netcom(_dot_)com (Rik Kabel) writes:
A quick question for the masters:
Which form do you prefer, and why?
A=B
:0
* test
{ A=C }
or
:0
* test
{ A=C }
:0 E
{ A=B }
When the test becomes complicated, or the assignments more
involved, is your answer different?
The former is less cluttered, so as long as 'B' is a simple string that
doesn't contain a backquoted command substitution, I would use the
former. If B does have a command substitution, but C doesn't, then I
would probably reverse the test. Otherwise the latter form will
guarantee that only of B or C will need to be expanded.
But those rules are free to be broken. For a given assignment I may
feel that it's easier to think about as an if/then/else instead of as
a this/unless/in-which-case.
Philip Guenther