473,765 Members | 2,059 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Screen Editing

I was just wondering if there is any way of editing anything already
printed on the screen with out using the system("cls") command.

Aug 17 '06
51 3937
On Thu, 17 Aug 2006, Thomas Dickey wrote:
Andrew Smallshaw <an*****@sdf.lo nestar.orgwrote :
>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.
I don't think Andrew is confused. I think you are.

Tak-Shing
Aug 17 '06 #11
On Thu, 17 Aug 2006, Herbert Rosenau wrote:
On Thu, 17 Aug 2006 00:33:37 UTC, "someone" <ra************ @gmail.com>
wrote:
>I was just wondering if there is any way of editing anything already
printed on the screen with out using the system("cls") command.
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.
C does know about character display semantics (ISO 9899/1990
*and* 1999, 5.2.2), specifically backspaces ('\b'), form feeds
('\f'), and carriage returns ('\r'). So yes, it is possible to
``edit'' something already printed on a display device (however,
quality of implementation differs).

Tak-Shing
Aug 17 '06 #12
On Thu, 17 Aug 2006, Ancient_Hacker wrote:
someone wrote:
>I was just wondering if there is any way of editing anything already
printed on the screen with out using the system("cls") command.

There is no "C" way to do this, as C precedes most CRT terminals,
What about ISO 9899:1990, 5.2.2, where escape sequences for
display devices (such as '\f', '\b' and '\r') are defined? The
only problem with these are quality of implementation issues.

Tak-Shing
Aug 17 '06 #13
Tak-Shing Chan <t.****@gold.ac .ukwrote:
On Thu, 17 Aug 2006, Thomas Dickey wrote:
>Andrew Smallshaw <an*****@sdf.lo nestar.orgwrote :
>>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.
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?

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
Aug 17 '06 #14
Thomas Dickey <di****@saltmin e.radix.netwrot e:
Tak-Shing Chan <t.****@gold.ac .ukwrote:
>On Thu, 17 Aug 2006, Thomas Dickey wrote:
>>Andrew Smallshaw <an*****@sdf.lo nestar.orgwrote :

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.
> 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?
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.

bye

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
Aug 17 '06 #15
On Thu, 17 Aug 2006, Thomas Dickey wrote:
Tak-Shing Chan <t.****@gold.ac .ukwrote:
>On Thu, 17 Aug 2006, Thomas Dickey wrote:
>>Andrew Smallshaw <an*****@sdf.lo nestar.orgwrote :

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.
> 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?
Andrew wrote: ``it's not guaranteed''. Which part of ``it's
not guaranteed'' you don't understand?

Tak-Shing
Aug 17 '06 #16
On Thu, 17 Aug 2006, Thomas Dickey wrote:
Thomas Dickey <di****@saltmin e.radix.netwrot e:
>Tak-Shing Chan <t.****@gold.ac .ukwrote:
>>On Thu, 17 Aug 2006, Thomas Dickey wrote:
>>>Andrew Smallshaw <an*****@sdf.lo nestar.orgwrote :

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.
>> 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?

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).

Tak-Shing
Aug 17 '06 #17
Tak-Shing Chan <t.****@gold.ac .ukwrote:
On Thu, 17 Aug 2006, Thomas Dickey wrote:
>Tak-Shing Chan <t.****@gold.ac .ukwrote:
>>On Thu, 17 Aug 2006, Thomas Dickey wrote:
>>>Andrew Smallshaw <an*****@sdf.lo nestar.orgwrote :

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.
>> 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?
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.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
Aug 17 '06 #18
On Thu, 17 Aug 2006, Thomas Dickey wrote:
Tak-Shing Chan <t.****@gold.ac .ukwrote:
>On Thu, 17 Aug 2006, Thomas Dickey wrote:
>>Tak-Shing Chan <t.****@gold.ac .ukwrote:
On Thu, 17 Aug 2006, Thomas Dickey wrote:

Andrew Smallshaw <an*****@sdf.lo nestar.orgwrote :
>
>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.

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?
> 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.
I don't need to know the answer, since Steve Summit's C-FAQ
19.4 covered this (``for clearing the screen, a halfway portable
solution is to print a form-feed character ('\f'), which will
cause some displays to clear''). Presumably, those displays that
would clear are still in use.

Tak-Shing
Aug 17 '06 #19
Tak-Shing Chan <t.****@gold.ac .ukwrote:
I don't need to know the answer, since Steve Summit's C-FAQ
rofl...
19.4 covered this (``for clearing the screen, a halfway portable
solution is to print a form-feed character ('\f'), which will
cause some displays to clear''). Presumably, those displays that
would clear are still in use.
The faq does contain some archaisms (and outright errors).

p.s: appeals to authority are generally regarded as inferior to direct
observation - something to consider if you choose to pursue a
technical career ;-)

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
Aug 17 '06 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
400
by: news.microsoft.com | last post by:
This is a cross post.... My problem is when I am using the split screen editor and I copy and paste from the bottom pane to the top pane, the top pane will reposition itself to where the bottom pane is pointed to and I loose my place in the upper pane. Has anyone experiences this, and is there a setting somewhere to change this behavior? Thanks.
3
4229
by: Simon East | last post by:
We recently upgraded from Windows 98 to Windows XP (clean install), but still required to edit Access 97 databases and so have kept Access 97. We installed Word XP and Excel XP, then Access 97. Access frequently crashes with the Win XP blue screen and the message "IRQL_NOT_LESS_THAN_EQUAL". I haven't seen the screen appear from any other program - the computer is otherwise quite stable. It can happen after just a few minutes of having...
1
1618
by: Patrick.O.Ige | last post by:
Hello guys i made a Datagrid with Editing,Update and Cancel using VS.NET. to my surprise nothing is on the screen after compilation .. By code below:- Imports System.Data Imports System.Data.SqlClient Imports System.Web.UI.WebControls Imports System.Web.UI.HtmlControls Public Class datagrid_edit Inherits System.Web.UI.Page
65
8636
by: Leslie Kis-Adam | last post by:
Hi everyone! Does anyone know, if it is possible to clear the screen in ANSI C? If it is,then how? Any help would be appreciated. Laszlo Kis-Adam <dfighter_AT-NOSPAM_freemail.hu
9
4749
by: Ray | last post by:
Hello, We have a requirement that when a user click a button to signify he wants to edit a certain area, everything else on the browser screen but that area will be disabled. In effect, it's analogous to a modal dialog box, the difference being the "dialog box" in this case is within the screen itself, not a separate popup one like a modal dialog box. It's just a certain area of the screen that becomes enabled when the user clicks the...
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9399
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10163
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9957
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9835
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3924
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.