• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question for Frank Carver  RSS feed

 
Johannes de Jong
tumbleweed
Bartender
Posts: 5089
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
H Frank you gave a pretty reply to a topic by Jamie http://www.javaranch.com/ubb/Forum1/HTML/000103.html
That you read both the long listings he provided amazes me
I have one question though, your comment:
Originally posted by Frank Carver:
and move the definitions of

to inside the "while" loop where they are used.


Surely this will mean that you will initialize the strings every time the loop is "executed'. Why do you suggest that he moves it into the loop.
Thanks for sharing you obvious in depth knowledge by the way.
JdJ
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the comments. I'm equally amazed that you are re-reading old messages from over a year ago!
In the case you mention, both strings are never used with their default initialized values. If you follow the code down, looking for the first use of each of the two variables, the first use is when they are set. So a better use would be something like:
 
Johannes de Jong
tumbleweed
Bartender
Posts: 5089
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At first I though you did not answer my question, then I printed it out compared your code with the original line for line, and the penny droped.
This was what you meant in your original comment to Jamie, intialize via the input you get from the user and not simply do this :

Man I'll be watching out for you and learning from you
Thanks
JdJ
[This message has been edited by Johannes de Jong (edited March 01, 2001).]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!