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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e61c8636ef35379d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-01-18 00:40:04 PST Path: supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed2.earthlink.net!newsfeed.earthlink.net!news.mindspring.net!not-for-mail From: Lao Xiao Hai Newsgroups: comp.lang.ada Subject: Re: Escape Sequences in Strings Date: Thu, 18 Jan 2001 00:29:19 -0800 Organization: MindSpring Enterprises Message-ID: <3A66A95F.61C03A3B@ix.netcom.com> References: <3A17B0E2@MailAndNews.com> <3A5F0407.AA6D7526@cfmu.eurocontrol.be> NNTP-Posting-Host: 3f.35.b5.9e Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Server-Date: 18 Jan 2001 08:32:34 GMT X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en Xref: supernews.google.com comp.lang.ada:4143 Date: 2001-01-18T08:32:34+00:00 List-Id: Instead of moving the cursor using Text_IO, I have seen a very interesting Ada program written by a Japanese programmer that used the low-level features of the language to directly reference Address Location Hexadecimal B800 to manipulate the screen mappings. This turns out to be quite easy with Ada. And it is really fast if you are doing high-speed game programming. No ESC sequences required. Richard Riehle ------------------------------------------------------------------------------------- Keith Thompson wrote: > Andrew Hately writes: > > Jean Cohen wrote: > [...] > > > As you all certainly know it is quite easy and > > > straightforward in C++ to set cursor positions, > > > the format (tabulators, newlines etc.) of a string etc. by using escape > > > sequences. > > > > IMHO Ada is easier and more straight forward. > > See section A.10 of the Ada Reference manual. "Text Input-Output" > > especially A.10.5 "Operations on Columns, Lines and Pages" > > It depends on what you're trying to do. If you want to do things like > moving the cursor to a specified position on the screen, neither C++ > nor Ada helps you much unless you use a library designed for the > purpose (curses, ncurses, terminfo, termcap). Ada's New_Page > procedure doesn't necessarily perform any specific action if you're > writing to a terminal; the only thing really guaranteed is that if > you're writing to a file, it writes something that will be recognized > as a page break when the file is read using Ada.Text_IO. > > -- > Keith Thompson (The_Other_Keith) kst@cts.com > San Diego Supercomputer Center <*> > MAKE MONEY FAST!! DON'T FEED IT!!