Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Some versions of BASIC going way back into the 80's (I very dimly remember Microsoft BASIC for Macintosh having it) have an OPTION BASE keyword allowing you to actually specify which array base to use (0 or 1).

Although I kind of like the following solution I found in a dusty corner of the Net:

http://vb.mvps.org/hardcore/html/optionbasezero-basedarrays....

Basically, you yourself specify the range indices.

    Dim ai(1 To 10) As Integer
    Dim ad(0 To 49) As Double
    Dim av(-10 To 10) As Variant


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: