On Feb 18, 2007, at 10:04 PM, Seth Willits wrote: > On Feb 18, 2007, at 7:36 PM, Craig A. Finseth wrote: > >> Sort of. If your array is 0 based, UBound is 1, even if it only >> has 1 >> element. So, you need to keep your own count of elements. *sigh*. > > No and no. > > UBound does exactly what it says it does, it returns the upper > bound, the last index. The docs say this quite clearly and a simple > example easily proves it. > > >> Arrays are 0-based and broken. > > How are they "broken"?? > > > >> Strings are 1-based. > > Unfortunately. > All the dialects of BASIC that I've ever seen had the string manipulation/search functions (InStr(), Left(), Right(), Mid(), etc...) as 1-based, so - for me at least - that's a more natural choice. Plus, changing it now would break a lot of string-handling code, methinks!
> > -- > Seth Willits > > > > _______________________________________________ > Unsubscribe or switch delivery mode: > <http://www.realsoftware.com/support/listmanager/> > > Search the archives: > <http://support.realsoftware.com/listarchives/lists.html> _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
