Why LBound?

Results 1 to 3 of 3

Thread: Why LBound?

  1. #1
    Join Date
    Dec 1969

    Default Why LBound?

    I&#039m almost (but as you can see I&#039m not completely) too embarassed to ask this, but why is there an LBound function and when is it used? Every time I try to use it (and I&#039ve tried different scenarios) it ALWAYS returns zero. If you can think of an example where it returns something other than zero, would you please be kind enough to pass it along? Thanks.

  2. #2
    Josh Hames Guest

    Default RE: Why LBound?

    well, to answer your question, I will quote the boys at Microsoft on this one: <BR><BR>"....since the safe array is created in VBScript and not in Visual Basic, the lbound method will always return zero."<BR><BR>any questions? = )

  3. #3
    Join Date
    Dec 1969

    Default RE: Why LBound?

    Josh gave the official answer.<BR><BR>The truth is probably that the person adapting the syntax of VBScript from that of Visual Basic probably didn&#039t talk to the person in charge of creating the arrays.<BR><BR>Hey, if nothing else it leaves the possibility that some day in the future MS *could* allow us to create arrays with bounds other than 0.<BR><BR>If you care, all of this goes back to about 1983 or 1984, when there was a big discussion over whether arrays should start with element 0 or element 1. When ANSI finally published the first spec, that was about the only thing that they made into a user-specifiable option.<BR><BR>You could write<BR>OPTION BASE 0<BR>or<BR>OPTION BASE 1<BR>at the start of your BASIC program to say which you wanted. <BR><BR>Can you say "Whoopee!" ??<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts