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 / 6999
6998  |  7000
Subject: 
Save arrays in VB5
Newsgroups: 
lugnet.robotics
Date: 
Fri, 24 Sep 1999 22:06:30 GMT
Original-From: 
Andy Gombos <gombos@ne.!Spamless!infi.net>
Reply-To: 
gombos@*nospam*ne.infi.net
Viewed: 
525 times
  
Does anyone know how to save an array in VB5? I have tried a for loop,
but it always says subscript out of range. It shouldn't be out of range
since I know how big the array is. Can anyone help? This is for a 2 step
scanner program.



Message has 3 Replies:
  Re: Save arrays in VB5
 
(...) Try this: dim i as integer for i=lbound(myarray) to ubound(myarray) <save the array element myarray(i) > next i Joel Shafer joel@connect.net (25 years ago, 24-Sep-99, to lugnet.robotics)
  R: Save arrays in VB5
 
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 (...) (25 years ago, 27-Sep-99, to lugnet.robotics)
  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 (...) (25 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
    
Active threads in Robotics

 
Verified and Trusted Team of Hackers
2 hours ago
Custom Search

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