S
someone
I was just wondering if there is any way of editing anything already
printed on the screen with out using the system("cls") command.
printed on the screen with out using the system("cls") command.
someone said:I was just wondering if there is any way of editing anything already
printed on the screen with out using the system("cls") command.
someone said:I was just wondering if there is any way of editing anything already
printed on the screen with out using the system("cls") command.
flush the output, stdout might be buffered.Chen said:printf("\033[2J"); /* clear screen */
printf("\033[%d;%dH", 10, 20); /* move cursor (row 10, col 20) */
printf("Hello, ");
printf("\033[7mworld\033[0m!"); /* inverse video */
I tried upper commands. Seems does not work proper as the explanations.
printf("\033[2J"); display"<-2j"
..........
could anyone tell me his results?
someone said:I was just wondering if there is any way of editing anything already
printed on the screen with out using the system("cls") command.
The most portable way is dorky, but works most every place I can think
of:
for( i=1; i <= 66 + 24 /* for those TALL full page displays,plus
lagniappe */; i++ )
puts( "\n" );
If your intended terminal has some alleged "ANSI" control code
capability, there's something gross, like puts( "\033;2J" ) that does
the trick, google for "termcap vt100" or ANSI and see the "cl" entry.
Ancient_Hacker said:There is no "C" way to do this, as C precedes most CRT terminals,
No, because C does know nothing about a screen, TTY, printer or otherI was just wondering if there is any way of editing anything already
printed on the screen with out using the system("cls") command.
Andrew Smallshaw said:Most terminals, particularly modern ones, will clear the screen if
you simply send them a formfeed. It's not guaranteed, but it's a
you're confused. Whether you've observed a particular terminal driver,
or a user application is probably irrelevant.
No, because C does know nothing about a screen, TTY, printer or other
devises. So you may ask in a group related to POSIX or to your OS to
get a solution beside standard C.
There is no "C" way to do this, as C precedes most CRT terminals,
[/QUOTE]Tak-Shing Chan said:you're confused. Whether you've observed a particular terminal driver,
or a user application is probably irrelevant.
I don't think Andrew is confused. I think you are.
hmm. I have a list in mind. Which "modern" one clears the screen
when you send a form-feed to it?
hmm. I have a list in mind. Which "modern" one clears the screen
when you send a form-feed to it?
It occurs to me that you don't know
(googling to get a sense of your background makes that apparent).
A quick check shows putty doing this. vt100/etc don't. putty, of course,
is not a vt100 emulator (or xterm, etc). xterm and anything that emulates
vt100 will simply move the cursor to the next line.
There's some useful information on vt100.net which you might read before
wasting more bandwidth.
[/QUOTE]Tak-Shing Chan said:hmm. I have a list in mind. Which "modern" one clears the screen
when you send a form-feed to it?
Andrew wrote: ``it's not guaranteed''. Which part of ``it's
not guaranteed'' you don't understand?
Indeed. You don't know the answer to my question, so you're attempting
to justify it by changing the question.
[/QUOTE]Tak-Shing Chan said:It occurs to me that you don't know
(googling to get a sense of your background makes that apparent).
A quick check shows putty doing this. vt100/etc don't. putty, of course,
is not a vt100 emulator (or xterm, etc). xterm and anything that emulates
vt100 will simply move the cursor to the next line.
There's some useful information on vt100.net which you might read before
wasting more bandwidth.
All irrelevant to my point. By the way, PuTTY is more
"modern" than vt100, but I suppose you are not aware of this
(judging from what you wrote above).
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.