Re: 0-based Indexing

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

Greg Haberek wrote:
<snip>
> It actually makes a lot of sense. For example, have you ever used
> The reason Euphoria uses 1-based indexing is to make it easier to read and
> understand. In some languages you can even set the minimum base, like in
> Visual Basic, with the command "Option Base 1" (i think, it's been a while
> since I've used VB).

VB 6.0 defaults to base 0 if Option Base is not used; also you can set lower
and upper bounds:

Dim YearData(1970 to 2010) as Integer

This is rather useful, as you can use 0-based, 1-based, or some other base,
whichever suits the algorithm at hand.

But I guess M$ doesn't like giving  the programmer that much freedom--VB.NET
uses 0-based indexing exclusively.

-- Mike Nelson
(I do VB for cash and Eu for love.)

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

Search



Quick Links

User menu

Not signed in.

Misc Menu