Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Reading from a file ?

 
Remaan Rem
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hello Every one ;)

I was wondering about a way to solve this code - or in other words make it work !!

Basically the idea behind it : read a file and process comands based on that file.

The main issue with this code is I can't really figure out why the first if statement is not executed ?




 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using upper-case names for variables is really confusing.

You're not really giving us enough information to go on, like... what's in the file? Are you talking about line 17?
 
Remaan Rem
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I should consider this advice with coming programing projects.
For this one :
In side the file: there are 5 lines of different commands
We want to read them and call the commands based on what we found in the file.

Using the Token and Tokenizer

I wish that helps

 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Me too, but it doesn't: if you want to debug why your code isn't working we need to know what data you're feeding the program.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic