473,771 Members | 2,394 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 3947

Tak-Shing Chan wrote:
On Thu, 17 Aug 2006, Keith Thompson wrote:
Andrew Smallshaw <an*****@sdf.lo nestar.orgwrite s:
[...]
Most terminals, particularly modern ones, will clear the screen if
you simply send them a formfeed. It's not guaranteed, but it's a
similar kind of assumption to backspace will move the cursor left
which seems pretty much standard these days.
I haven't found that to be the case for any of the terminal emulators
I use. I've just tried xterm, dtterm, gnome-terminal, a Windows
command window, the GNU "screen" program, and rxvt; none of them clear
the screen in response to a formfeed character.

I have just posted a long list elsethread.
You posted a long list which has no obvious relevance to the point in
question. The list is a long way from "most terminals" and few of the
ones listed count as modern (one was recently sold as a rare antique
computer, many are archaic museum pieces).

Aug 18 '06 #41
On Fri, 18 Aug 2006, Thomas Dickey wrote:
Tak-Shing Chan <t.****@gold.ac .ukwrote:
>On Fri, 18 Aug 2006, Thomas Dickey wrote:
>>Those that don't, either use vt100-compatible terminals (OpenVMS), or do
not make use of terminals (barring the miniscule fraction running Plan 9 ;-)
> There are embedded Linux systems without curses.

Which are the ones running a widely-used non-vt100-compatible terminal?
Widely-used? I don't know. But there exists systems where
you can access the console thru the serial port---I've seen a
few of those.

Tak-Shing
Aug 18 '06 #42
Tak-Shing Chan <t.****@gold.ac .ukwrote:
On Fri, 18 Aug 2006, Thomas Dickey wrote:
>Tak-Shing Chan <t.****@gold.ac .ukwrote:
>>On Fri, 18 Aug 2006, Thomas Dickey wrote:
>>>Those that don't, either use vt100-compatible terminals (OpenVMS), or do
not make use of terminals (barring the miniscule fraction running Plan 9 ;-)
>> There are embedded Linux systems without curses.

Which are the ones running a widely-used non-vt100-compatible terminal?
Widely-used? I don't know. But there exists systems where
you can access the console thru the serial port---I've seen a
few of those.
A serial port is a data connection (a wire)
It doesn't present data (a terminal).

Again, unless it's widely used, it doesn't add to the "most" category.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
Aug 18 '06 #43
On Fri, 17 Aug 2006, J. J. Farrell wrote:
>
Tak-Shing Chan wrote:
>On Thu, 17 Aug 2006, Keith Thompson wrote:
>>Andrew Smallshaw <an*****@sdf.lo nestar.orgwrite s:
[...]
Most terminals, particularly modern ones, will clear the screen if
you simply send them a formfeed. It's not guaranteed, but it's a
similar kind of assumption to backspace will move the cursor left
which seems pretty much standard these days.

I haven't found that to be the case for any of the terminal emulators
I use. I've just tried xterm, dtterm, gnome-terminal, a Windows
command window, the GNU "screen" program, and rxvt; none of them clear
the screen in response to a formfeed character.

I have just posted a long list elsethread.

You posted a long list which has no obvious relevance to the point in
question. The list is a long way from "most terminals" and few of the
ones listed count as modern (one was recently sold as a rare antique
computer, many are archaic museum pieces).
OK. Let me trim it down to just one item: the Sun console.
It is certainly still in use today, and it does clear the screen
with '\f'. But you are absolutely right, this has little
relevance to ``most terminals''. Perhaps I should s/most/some/g.

Tak-Shing
Aug 18 '06 #44
On Fri, 18 Aug 2006, Thomas Dickey wrote:
Tak-Shing Chan <t.****@gold.ac .ukwrote:
>On Fri, 18 Aug 2006, Thomas Dickey wrote:
>>Which are the ones running a widely-used non-vt100-compatible terminal?
> Widely-used? I don't know. But there exists systems where
you can access the console thru the serial port---I've seen a
few of those.

A serial port is a data connection (a wire)
It doesn't present data (a terminal).
The serial driver doesn't, but the console driver does.
Again, unless it's widely used, it doesn't add to the "most" category.
Fair enough.

Tak-Shing
Aug 18 '06 #45
Tak-Shing Chan <t.****@gold.ac .ukwrote:
On Fri, 17 Aug 2006, J. J. Farrell wrote:
>You posted a long list which has no obvious relevance to the point in
question. The list is a long way from "most terminals" and few of the
ones listed count as modern (one was recently sold as a rare antique
computer, many are archaic museum pieces).
OK. Let me trim it down to just one item: the Sun console.
It is certainly still in use today, and it does clear the screen
with '\f'. But you are absolutely right, this has little
relevance to ``most terminals''. Perhaps I should s/most/some/g.
yes - "some". As a colleague pointed out to me (quite a while ago),
as I was modifying a terminal driver to do form-feeds, _printers_
do form-feeds, terminals are not expected to do this.

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

>>>Which are the ones running a widely-used non-vt100-compatible terminal?

>> Widely-used? I don't know. But there exists systems where
you can access the console thru the serial port---I've seen a
few of those.


A serial port is a data connection (a wire)
It doesn't present data (a terminal).


The serial driver doesn't, but the console driver does.
>Again, unless it's widely used, it doesn't add to the "most" category.


Fair enough.
Getting rather off topic....

--
Ian Collins.
Aug 18 '06 #47
On Fri, 18 Aug 2006, Ian Collins wrote:
Tak-Shing Chan wrote:
>On Fri, 18 Aug 2006, Thomas Dickey wrote:
>>Tak-Shing Chan <t.****@gold.ac .ukwrote:

On Fri, 18 Aug 2006, Thomas Dickey wrote:
Which are the ones running a widely-used non-vt100-compatible terminal?
Widely-used? I don't know. But there exists systems where
you can access the console thru the serial port---I've seen a
few of those.
A serial port is a data connection (a wire)
It doesn't present data (a terminal).


The serial driver doesn't, but the console driver does.
>>Again, unless it's widely used, it doesn't add to the "most" category.


Fair enough.
Getting rather off topic....
Sorry. I should volunterily ban myself from comp.lang.c
for a month...

Tak-Shing
Aug 18 '06 #48
Tak-Shing Chan <t.****@gold.ac .ukwrites:
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.
It says that \f (form feed) "moves the active position to the initial
position at the start of the next logical page."

I don't see anything there about clearing the screen.

I think we all know by now that *some* terminals and terminal
emulators will clear the screen in response to a formfeed characters,
and some will not. (It happens that most of the ones I use or have
access to don't. I suspect my experience in this case is typical; I
certainly don't claim that it's universal.)

In my opinion, the statement in question 19.4 of the FAQ that clearing
the display by printing a formfeed character is "halfway portable" is
incorrect, or at least over-stated.

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Aug 18 '06 #49
On Fri, 18 Aug 2006, Keith Thompson wrote:
Tak-Shing Chan <t.****@gold.ac .ukwrites:
>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.

It says that \f (form feed) "moves the active position to the initial
position at the start of the next logical page."

I don't see anything there about clearing the screen.

I think we all know by now that *some* terminals and terminal
emulators will clear the screen in response to a formfeed characters,
and some will not. (It happens that most of the ones I use or have
access to don't. I suspect my experience in this case is typical; I
certainly don't claim that it's universal.)

In my opinion, the statement in question 19.4 of the FAQ that clearing
the display by printing a formfeed character is "halfway portable" is
incorrect, or at least over-stated.
I agree with you vis-a-vis '\f', but my reply above was an
attempt to paint a larger picture---that it is indeed possible to
``edit'' something that is already written on the screen, if not
by '\f', then by '\r' or '\b' on the current line.

Tak-Shing
Aug 18 '06 #50

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
8644
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
9619
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
9454
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
10260
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
10102
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
10038
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
8933
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.