Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Back Again with a program...

 
Aaron Woodland
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm back again with anoth problem... I was making a simple program that just ran/made the song ""99 Bottles of beer on the wall". I can not find out the problem though with it, because I am only my screens worth of bottles. This is what I mean, whenever I run the program it quickly goes down to bottle #1 and whenever I scroll up to the very top it does not show the execution of my program like :
or the rest of the bottles. In essence it only shows up to 59 bottles of beer on the wall and not 99... This is the code of the program:


If anyone can help with it, I do appreciate it.
Thanks,
Aaron
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since you're on Windows, could it be that your terminal is set to a buffer size of 40 lines, thus deleting all earlier program output?
[ August 14, 2005: Message edited by: Ulf Dittmer ]
 
Marilyn de Queiroz
Sheriff
Posts: 9063
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like it ran ok to me.

You have several choices.
1) You can write the output to a file
java BeerSong > beerSong.txt
Now open the bearSong.txt file with an editor (Notepad?)

2) You can increase the length of your DOS screen
Open a DOS prompt window
Click on the icon on the top left. Click on Properties.
Go to the "Layout" tab.
Under "Screen Buffer Size" change the "Height:" to something around 500 (Your output is 495 lines long).
Click "OK"

3) That's probably enough choices for now.
 
Aaron Woodland
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your information again. It has helped again once more!
Thanks,
Rat
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic