To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 7254
7253  |  7255
Subject: 
R: R: Save arrays in VB5
Newsgroups: 
lugnet.robotics
Date: 
Wed, 6 Oct 1999 10:45:43 GMT
Original-From: 
Roberto Amato <{RobertoAmato@mclink.it}saynotospam{}>
Viewed: 
2246 times
  
Fantastic. All this time I believed it wrong.
I checked and of course it's true, either on VB and on
old QB. Thanks for that.

Roberto

-----Messaggio Originale-----
Da: Joel Shafer <joel@connect.net>
A: Roberto Amato <RobertoAmato@mclink.it>
Cc: <lego-robotics@crynwr.com>
Data invio: lunedì 27 settembre 1999 14.26
Oggetto: Re: R: Save arrays in VB5


> At 10:12 AM 9/27/99 +0100, you wrote:
> > If you dimension an array of (say) 100 elements as : DIM a(100) as • integer
> > the array elements goes from 0 to 99, for a total of 100. So if
> > your loop searches for a 100th elements it comes out with the
> > "subscript out of range" error. Either restate the loop or esplicitly
> > dim the array differently using the keyword "to" as : DIM a(1 TO 100) as
> > integer.
> > 
> > regards
> > Roberto
> 
> Actually, when you say Dim a(100) as integer, the array contains 101
> elements ranging from element 0 to element 100.  By default VB starts
> arrays at the 0th element (this can be changed).  The Dim statement for
> arrays doesn't specify the number of elements as you would suppose, but
> rather specifies the upper boundary of the array.
> 
> 
> Joel Shafer    joel@connect.net
> 
> 



Message is in Reply To:
  Re: R: Save arrays in VB5
 
(...) Actually, when you say Dim a(100) as integer, the array contains 101 elements ranging from element 0 to element 100. By default VB starts arrays at the 0th element (this can be changed). The Dim statement for arrays doesn't specify the number (...) (27 years ago, 27-Sep-99, to lugnet.robotics)

5 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR