guy wrote:
I do not usually use the colon in my code
.... likewise ...
however sometimes i find it useful, e.g. pulling data from an array
...
i += 1 : this = stuff(i)
i += 1 : that = stuff(i)
i += 1 : theOther = stuff(i)
...
Personally, unless both of these arrays are dynamic and the index ranges
all over the place, I'd just /hard-code/ the offsets:
Const XOffset as Integer = 0
Const YOffset as Integer = 1
Const ZOffset as Integer = 2
this = stuff( i + XOffset )
that = stuff( i + YOffset )
theOther = stuff( i + ZOffset )
as it reads more clearly than incrementing i on a separate line.
Agreed.
Is this considered bad practice?
It certainly /used/ to be (I'm thinking VB6 here) because it was darned
difficult to put breakpoints on the second and subsequent statements on
a given line.
I don't think it's a problem any more, so whatever works for you...
HTH,
Phill W.
>
guy