in reply to Re^3: How to split a string
in thread How to split a string

No, I don't think so. My examples correspond to pin out locations and are hardly ever sequential. I guess I could use an array to store them but it would be extremly sparse.

I believe merlyn's point (if I may bo so bold) is that a developer shouldn't just enumerate variables. IE ($t1, $t2, $t3, etc). Which I agree with whole heartedly.

However I disagree that digits should be disallowed from a variable name in a language to avoid the problem. There are a lot of valid uses for a digit in a variable. The only way to keep developers from doing this is to educate them on the disadvantages.


"Look, Shiny Things!" is not a better business strategy than compatibility and reuse.

Replies are listed 'Best First'.
Re^5: How to split a string
by Aristotle (Chancellor) on Jan 28, 2005 at 21:45 UTC

    My examples correspond to pin out locations and are hardly ever sequential. I guess I could use an array to store them but it would be extremly sparse.

    Hmm. You could use a hash or use named constants to say something like $pin[ FOO_SENSOR ], then.

    Makeshifts last the longest.

      But it's already in a hash: %::

      :^D

      "Look, Shiny Things!" is not a better business strategy than compatibility and reuse.