On 1/11/10 20:29 John Bodoh asked: > Is a programmer thinking zero based or one base when they are programming > for REXX?
All _people_ start lists with '1'. All _programmers_ (before the mid-seventies) started lists with '1'. _Only_C_programmers_ adjust their thinking to start lists with '0'. Their bike handlebars were misaligned ten degrees to the left since they got it. When they get on a bike with the handlebars aligned with the axis of the wheel, they will quickly accommodate because that's what _people_ do. While there are many issues of program language design that are matters of taste, style, peculiar environment, and such, this is one where Ritchie simply got it wrong. He had his reason, but that is exactly one of those cases where a short-term impediment should not be allowed to drive design. If a C programmer uses Rexx (in any flavor) he will have to adjust his thinking on quotes, strings, operators, and quite a few other matters besides the first index of a list. I, too, agree that Mike has the best approach. A flag will indicate 0- or 1-based indices with the latter the default. You could use the same mechanism for other differences such as the treatment of the double-quote if you wish. -Chip- ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Oorexx-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/oorexx-devel
