comp.lang.ada
 help / color / mirror / Atom feed
From: Ross Higson <rosshigson_REMOVE_ME_@optusnet.com.au>
Subject: Re: Why do the escape sequences not work?
Date: Sun, 03 Oct 2004 09:52:40 +1000
Date: 2004-10-03T09:52:40+10:00	[thread overview]
Message-ID: <415f3ffe$0$23893$afc38c87@news.optusnet.com.au> (raw)
In-Reply-To: <415f38b1$0$23897$afc38c87@news.optusnet.com.au>

Ross Higson wrote:

> stephane richard wrote:
> 
>> "GlesgaMick" <sikmick@yahoo.com> wrote in message 
>> news:d23e6915629caea950f8445632cbd448@localhost.talkaboutprogramming.com... 
>>
>>
>>> According to what iv'e read, the commands to clear the screen are:
>>>
>>> Ada.Text_IO.Put(Item => ASCII.ESC);
>>> Ada.Text_IO.Put(Item => "[2J");
>>>
>>> on my compuer they simply make the text value of ESC apear followed 
>>> by the
>>> [2J.  I'm using Windows ME at the command prompt. and suspect it has
>>> sometyhing to do with the way the OS recognised escape codes... but ca
>>> anyone direct me somewhere where i can find the right escape codes?
>>>
>>>
>>
>> I believe you need your ansi.sys driver installed (if that exists in 
>> XP :-).....it's a console problem. Only with ansi.sys installed (or 
>> emulated if it can) can these escape commands work.
>>
> The ansi.sys solution is sufficient if you only need to use the few 
> escape codes that were originally supported by DOS - luckily "ESC[2J" is 
> one of these. I'd certainly suggest you try that first.
> 
> However, if you can't get ansi.sys to work under Windows ME, or you want 
> or need to use some of the more sophisticated escape codes then I have a 
> package that is compatible with the standard Ada Text_IO but adds 
> emulation support for terminals such as DEC VTxxx or ISO 6429. Using 
> this package also means that your program no longer has to use the 
> 'console' subsystem of Windows. In particular, this means you can open 
> multiple terminal windows from the same program if you need them.
> 
> The full package is available from 
> http://members.optusnet.com.au/~rosshigson/terminal
> 
> Note that this package requires GNAT 3.14p or later, and also GWindows 
> 1.1 (more details in the distribution). If you do use it, then please 
> let me know how it goes - I have tested it on all other versions of 
> Windows and I believe it will work under Windows ME, but as I don't have 
> a copy of ME I've never been able to verify this.
> 
> Ross.

Sorry, should have pointed out - you don't need to go to the hassle of 
downloading or compiling GWindows just to see if my package will do the 
job for you. Just get the compiled version from the link above and 
execute your program using my 'redirect' utility. For example, if you 
are using GNAT and the standard GNAT 'diners' example program doesn't 
work (which it doesn't if you don't have ansi.sys installed), then you 
can instead say 'redirect diners'. This will run the diners program with 
its standard input/output redirected to a terminal window instead of a 
console window. This terminal window implements full VTxxx terminal 
emulation.

Ross.



  reply	other threads:[~2004-10-02 23:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-02 12:55 Why do the escape sequences not work? GlesgaMick
2004-10-02 12:58 ` stephane richard
2004-10-02 13:02   ` stephane richard
2004-10-02 13:11     ` stephane richard
2004-10-02 13:37       ` GlesgaMick
2004-10-02 14:34         ` Marius Amado Alves
2004-10-02 14:37         ` stephane richard
2004-10-02 23:21   ` Ross Higson
2004-10-02 23:52     ` Ross Higson [this message]
2004-10-03  0:03       ` stephane richard
2004-10-03  0:37   ` Brian May
2004-10-03  1:03     ` Ross Higson
2004-10-03 13:27     ` CBFalconer
2004-10-03 22:46       ` Brian May
2004-10-05 17:45 ` GlesgaMick
2004-10-05 19:15   ` Marc A. Criley
2004-10-05 19:32   ` Frank J. Lhota
2004-10-05 19:54   ` Jeffrey Carter
replies disabled

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