• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Read info from a file into a array with a loop error

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have some small code here where i am using an array as a member variable and i am trying to make a loop where it will read in a segment of code into each iteration of the array. There is both an array and a class named VisitProcedure. The numProcedure int is how many objects the array will hold. Within my loop i believe i successfully initialize the new declaration of each array iteration but i then need to store the information from the VisitProcedure.Read(s) into each iteration.  Currently i have




The issue is just within my for loop, i cannot get the correct syntax which will store the info from VisiProcedure.Read(s) into each iteration of the VisitProcedure array.
 
Saloon Keeper
Posts: 10705
86
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows ChatGPT
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We need to see more code for context. Specifically, we'll need to see your Read() methods.

All variable and method names must begin with a lower case  letter. This includes you "VisitProcedure" array.
 
zach pass
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the name is hat way because it was given to me and as for the read method it has worked in prior programs but here it is


I have imported VisitProcedure but have not imported the procedure class if that makes a difference
 
Carey Brown
Saloon Keeper
Posts: 10705
86
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows ChatGPT
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is my best guess based on what you've posted. Is the VisitProcedure class so long that you don't dare post it?
 
zach pass
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Im thinking thats correct, thanks. But yes the VisitProcedure class is 200+ lines too long to post it would clog everything and the read method is the only part of that class that i need to call.
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We can only help if we have the information we need.
 
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

zach pass wrote:VisitProcedure class is 200+ lines too long to post...


You could use GitHub to post the code.
 
Campbell Ritchie
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have no difficulty reading 200 lines here.
 
reply
    Bookmark Topic Watch Topic
  • New Topic