English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

OK, this is for JAVA users...
I work in the MS DOS environ. My problem is I am unable to define a proper function to clear the output screen. All I do is define a function with a for loop which scrolls down by 26 lines - a thoroughly useless code for proper use. Can anyone devise a suitable code for me ?
PLEASE HELP...

2006-08-11 04:57:44 · 2 answers · asked by Anonymous in Computers & Internet Programming & Design

Please, I am using JAVA, NOT directly MS DOS.

2006-08-11 05:03:26 · update #1

2 answers

You can try making a system call to "cls", but I don't know if that will work. There's a little bit of information about it here: http://www.michael-thomas.com/tech/java/javaadvanced/platform/ under the section "Additional Notes". If that doesn't work, there's a better way to scroll than with a for loop. Instead of doing the scrolling with a for loop, you could do it by printing a long literal string of newlines. Like "\n\n\n\n\nn\n\n\n \n\n\n\n\n\n\n\n\n" or something similar. Good luck!

2006-08-11 06:06:47 · answer #1 · answered by anonymous 7 · 3 0

Doesn't CLS clear the screen in DOS.

2006-08-11 05:01:48 · answer #2 · answered by Barkley Hound 7 · 1 2

fedest.com, questions and answers