From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,19d07d96f103778e X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!newsfeed-east.nntpserver.com!nntpserver.com!news1.optus.net.au!optus!newsfeeder.syd.optusnet.com.au!news.optusnet.com.au!not-for-mail Date: Sun, 03 Oct 2004 09:21:25 +1000 From: Ross Higson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Why do the escape sequences not work? References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <415f38b1$0$23897$afc38c87@news.optusnet.com.au> NNTP-Posting-Host: 211.30.68.34 X-Trace: 1096759473 23897 211.30.68.34 Xref: g2news1.google.com comp.lang.ada:4582 Date: 2004-10-03T09:21:25+10:00 List-Id: stephane richard wrote: > "GlesgaMick" 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.