Use of IIF
On Wed, 20 Aug 2003 10:06:04 -0400, Tushar Mehta
wrote:
temp = a: a = b: b = temp.
For me the beauty in this is enhancing vertical context. When you can
only see 25-30 lines of code on the screen at one time, it's often nice
to be able to see [more] indent levels and other flow and scope
information - _especially_ when you start nesting code (where you have
the additional problem of horizontal overreach!). But like Bob, and no
doubt you, I make a judgement call as to whether I'll "fool myself" -
which generally translates to: "If it's short and my mind can process it
instantly and accurately, cram it on one line."
As to iif, same deal - it's a judgement call. If I don't sense that it
will "fool myself" or hamper instant recognition of its functionality, I
usually jump on it for the benefit of vertical context improvement.
Ergo my favorite statement in VBA is "End If" - that's where I have room
to comment the ensuing logic (LOL and ducking)
WB <--- hairy overnesting coder <g
|