comp.lang.ada
 help / color / mirror / Atom feed
* SunOS Clear Screen
@ 1997-02-26  0:00 Perry K. Lund
  1997-02-27  0:00 ` Robert Dewar
  0 siblings, 1 reply; 7+ messages in thread
From: Perry K. Lund @ 1997-02-26  0:00 UTC (permalink / raw)



Sorry for asking this question again, but at the time I did not need to
think about it.

Where can I find information on accomplishing a clear screen command for
Ada.  I am running GNAT under the Sun Solaris OS.

-- 


-------------------------------------------------------------------
Perry Lund                                 
Graduate Student CS             Instructor Applied Computer Science
UNI 1996 - 1997                                William Penn College
Cedar Falls, Iowa 50614                       Oskaloosa, Iowa 52577
-------------------------------------------------------------------




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: SunOS Clear Screen
  1997-02-26  0:00 SunOS Clear Screen Perry K. Lund
@ 1997-02-27  0:00 ` Robert Dewar
  1997-02-27  0:00   ` Larry Kilgallen
  1997-02-28  0:00   ` Jean-Etienne Doucet,149,6323
  0 siblings, 2 replies; 7+ messages in thread
From: Robert Dewar @ 1997-02-27  0:00 UTC (permalink / raw)



Perry asks

<<Where can I find information on accomplishing a clear screen command for
Ada.  I am running GNAT under the Sun Solaris OS.>>

The important thing to realize is that this is not an Ada question at all.
Ada gives you the capability of generating output streams of bytes. You
have to find out how to clear a screen given the particular terminal drivers
and environment you are using, and either you must write some special
sequence out (e.g. a Ctrl-L might work in some cases), or you need to call
a specialized routine (e.g. an appropriate routine in the curses library).

But don't look to Ada for a solution to this. Note that exactly the same
would be true in C, there is no way to clear a screen in C either!





^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: SunOS Clear Screen
  1997-02-27  0:00 ` Robert Dewar
@ 1997-02-27  0:00   ` Larry Kilgallen
  1997-02-27  0:00     ` Tom Moran
  1997-02-28  0:00   ` Jean-Etienne Doucet,149,6323
  1 sibling, 1 reply; 7+ messages in thread
From: Larry Kilgallen @ 1997-02-27  0:00 UTC (permalink / raw)



In article <dewar.857058369@merv>, dewar@merv.cs.nyu.edu (Robert Dewar) writes:
> Perry asks
> 
> <<Where can I find information on accomplishing a clear screen command for
> Ada.  I am running GNAT under the Sun Solaris OS.>>
> 
> The important thing to realize is that this is not an Ada question at all.
> Ada gives you the capability of generating output streams of bytes. You
> have to find out how to clear a screen given the particular terminal drivers
> and environment you are using, and either you must write some special
> sequence out (e.g. a Ctrl-L might work in some cases), or you need to call
> a specialized routine (e.g. an appropriate routine in the curses library).

And for some "screens", where one is not emulating a dumb terminal,
there is no simple set of characters to write.

> But don't look to Ada for a solution to this. Note that exactly the same
> would be true in C, there is no way to clear a screen in C either!

I think the issue arises because of pathelogical intermixing of
languages and operating system environments in products like
Borland Pascal.  Folks who start in that realm don't see where
the Pascal ends and the Borland begins.

When one starts with a more academic approach to programming
languages, and advances to software engineering approaches,
the first response to the "how do I clear the screen" question
is "what screen" -- appropriate either to the rocket environment
with zero screens or the Airline Control Program with 4000 screens.

Larry Kilgallen




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: SunOS Clear Screen
  1997-02-27  0:00   ` Larry Kilgallen
@ 1997-02-27  0:00     ` Tom Moran
  1997-02-28  0:00       ` Larry Kilgallen
  0 siblings, 1 reply; 7+ messages in thread
From: Tom Moran @ 1997-02-27  0:00 UTC (permalink / raw)



> Borland Pascal.  Folks who start in that realm don't see where
> the Pascal ends and the Borland begins.
> 
> When one starts with a more academic approach to programming
> languages, and advances to software engineering approaches,
 A recent article (I forget where) showed a rather large (42% ?)
decrease over the last 5 years or so in CS BS degrees.  Does that mean
that the vast majority of current/future programmers are coming from the
'non-acedmenic' realm, and thus quite reasonably ask this kind of
question?




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: SunOS Clear Screen
  1997-02-27  0:00     ` Tom Moran
@ 1997-02-28  0:00       ` Larry Kilgallen
  0 siblings, 0 replies; 7+ messages in thread
From: Larry Kilgallen @ 1997-02-28  0:00 UTC (permalink / raw)



In article <3315FE64.2FC3@bix.com>, Tom Moran <tmoran@bix.com> writes:
>> Borland Pascal.  Folks who start in that realm don't see where
>> the Pascal ends and the Borland begins.
>> 
>> When one starts with a more academic approach to programming
>> languages, and advances to software engineering approaches,

>  A recent article (I forget where) showed a rather large (42% ?)
> decrease over the last 5 years or so in CS BS degrees.  Does that mean
> that the vast majority of current/future programmers are coming from the
> 'non-acedmenic' realm, and thus quite reasonably ask this kind of
> question?

I think that statistic will have less effect regarding new Ada
programmers than the availability of compilers which are inexpensive
ranging down to free.

Not only is an Ada compiler cheaper than Borland, but the organization
of the newsgroups is simpler :-).

Larry Kilgallen




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: SunOS Clear Screen
  1997-02-27  0:00 ` Robert Dewar
  1997-02-27  0:00   ` Larry Kilgallen
@ 1997-02-28  0:00   ` Jean-Etienne Doucet,149,6323
  1997-03-03  0:00     ` Keith Thompson
  1 sibling, 1 reply; 7+ messages in thread
From: Jean-Etienne Doucet,149,6323 @ 1997-02-28  0:00 UTC (permalink / raw)



In article 857058369@merv, dewar@merv.cs.nyu.edu (Robert Dewar) writes:
| Perry asks
| 
| <<Where can I find information on accomplishing a clear screen command for
| Ada.  I am running GNAT under the Sun Solaris OS.>>
| 
| The important thing to realize is that this is not an Ada question at all.
| 
| But don't look to Ada for a solution to this. Note that exactly the same
| would be true in C, there is no way to clear a screen in C either!
| 


All the Ada compilers I've worked with (including Gnat) on a Sparc with SunOS
clear the screen by simply calling Ada.Text_IO.New_Page.

Curiously, the usual <Escape> & "[2J" sequence doesn't seem to work...

Good luck.


_______________________________________________________________________________
Jean-Etienne Doucet / LAAS-CNRS / Toulouse, France       E-mail: doucet@laas.fr






^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: SunOS Clear Screen
  1997-02-28  0:00   ` Jean-Etienne Doucet,149,6323
@ 1997-03-03  0:00     ` Keith Thompson
  0 siblings, 0 replies; 7+ messages in thread
From: Keith Thompson @ 1997-03-03  0:00 UTC (permalink / raw)



In <5f65m9$re3@news.cict.fr> doucet@ripolin.laas.fr (Jean-Etienne Doucet,149,6323) writes:
[...]
> All the Ada compilers I've worked with (including Gnat) on a Sparc with SunOS
> clear the screen by simply calling Ada.Text_IO.New_Page.
> 
> Curiously, the usual <Escape> & "[2J" sequence doesn't seem to work...

That's odd.  Ada.Text_IO.New_Page typically prints a formfeed (control-L)
character.  That will clear the screen and home the cursor on a Sun
console (i.e., a Sun graphics monitor being used as a text terminal,
not running any window system), but not on most other modern terminals
or emulators.

What terminal or emulator are you using?

-- 
Keith Thompson (The_Other_Keith) kst@sd.aonix.com <http://www.aonix.com> <*>
TeleSo^H^H^H^H^H^H Alsy^H^H^H^H Thomson Softw^H^H^H^H^H^H^H^H^H^H^H^H^H Aonix
10251 Vista Sorrento Parkway, Suite 300, San Diego, CA, USA, 92121-2706
"Humor is such a subjective thing." -- Cartagia




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~1997-03-03  0:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-02-26  0:00 SunOS Clear Screen Perry K. Lund
1997-02-27  0:00 ` Robert Dewar
1997-02-27  0:00   ` Larry Kilgallen
1997-02-27  0:00     ` Tom Moran
1997-02-28  0:00       ` Larry Kilgallen
1997-02-28  0:00   ` Jean-Etienne Doucet,149,6323
1997-03-03  0:00     ` Keith Thompson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox