Re: Setting based 1 Arrays

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"Michael C" <mike@xxxxxxxxxx> wrote in message news:ejIDKDtyJHA.4136@xxxxxxxxxxxxxxxxxxxxxxx

Ok, let me see mike. I start a copy of vb6 and type in this code
Private Sub Form_Load()
Dim x(10)
x(0) = 5
End Sub
hmmmm, seems to me that that array is zero based.

Not necessarily. If you do not actually specify the desired base in the declaration then it will default to the value you have assigned using the Option Base statement, or to the default setting of zero if you have not used Option Base. It's all clearly described in the documentation.

If the documentation says otherwise then it is wrong.

No, the documentation is fine. It is you who are wrong, Michael. You have not read it, or if you have done then you have failed to understand it. As I said, it's all clearly described there.

However, some other areas of vb6 are most definately 1 based.
Which areas are 1 based and which are zero based appears to
be random.

Nope. It's not random at all. It is all clearly described in the documentation.

You're not being very clear mike . . .

I think it is you who is not being clear, possibly because of your lack of understanding due to the fact you have not read the documentation. Don't worry too much though. Programming is always a bit awkward at first. You'll pick it up if you stick at it ;-)

Mike



.



Relevant Pages

  • Re: Setting based 1 Arrays
    ... Generally I don't have documentation from last century on my PC so no I have no read it. ... some other areas of vb6 are most definately 1 based. ... Which areas are 1 based and which are zero based appears to be random. ... I probably would not have used it in our WCVB.BAS header interface file because it has the explicit lower and upper range defined for the arrays field we have. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: create a sequential number for field
    ... but I believe the poster said that she had a default value of zero on the field. ... Private Sub Last_Name_AfterUpdate ... "Evi" wrote: ... Did you put the code in the *After* Update Event of the control ...
    (microsoft.public.access.gettingstarted)
  • Re: Maximum number of bits
    ... "Michael C" wrote in message ... Sorry, I certainly wasn't calling game over, just stating the facts. ... My idea to counter this was to look for simple patterns that would make calculation of the number of contiguous zero bits simple. ...
    (microsoft.public.sqlserver.programming)
  • Re: Filtering a Form with vba
    ... > The column count is zero based, so the first column is number zero. ... > Private Sub City_AfterUpdate ... >>I would like to know how to write code to filter my Form. ...
    (microsoft.public.access.formscoding)
  • Re: Still on displaying images
    ... If you have no image then set Me.Detail.Height to zero in the Detail_Format event. ... content to occupy zero space. ... Private Sub Detail_Format ... >certificate and then have 10 which do have certificates. ...
    (microsoft.public.access.modulesdaovba)