Re: commabominations

new topic     » goto parent     » topic index » view thread      » older message » newer message

At 05:03 21/01/01 -0000, someone wrote:
<snip>
>All true, but it becomes burdensome:
>
>global constant X0 = 42
>global constant X1 = 305
>...
>global constant x127 = 61
>
>and like that. That's why we were given the ability to put 'em in a
>comma-separated list in the first place.
</snip>

So:

constant X1 = 27, X2 = 31, X3 = 35, X4 = 39, X5 = 43, X6 = 47, X7 = 51, X8
= 55, X9 = 59, X10 = 63, X11 = 67, X12 = 71, X13 = 75, X14 = 79, X15 = 83

if more readable/editable than:

constant X1 = 27
constant X2 = 31
constant X3 = 35
constant X4 = 39
constant X5 = 43
constant X6 = 47
constant X7 = 51
constant X8 = 55
constant X9 = 59
constant X10 = 63
constant X11 = 67
constant X12 = 71
constant X13 = 75
constant X14 = 79
constant X15 = 83

smile

Ok I totally concede that this is simply a style preference but,
personally, I have always gone for the:

constant X1 = 27
constant X2 = 31
constant X3 = 35

format simply because a later cut/paste/edit to the source is less likely
to trip things up if the first and/or last item is involved.

Generally my solution to this whole "separator or terminator" issue is to
avoid separator or terminator issues by ignoring the facility.  If you
can't trust yourself with a sharp knife then don't use it.  I can't so I
don't.

And yes I'd probably be happy living in a cave too :-]

Regards,

Andy Cranston.

>
>Given the choice of declaring each item separately or dealing with the
>irregularities in the use of commas, as is often the case I might be willing
>to do more typing if it will make life easier overall.
>
>Glad you broght up that alternative.
>
>George
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com
>
>

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu