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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d86a147e5da7c384 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-09 18:37:29 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!unlnews.unl.edu!newsfeed.ksu.edu!nntp.ksu.edu!news.okstate.edu!not-for-mail From: David Starner Newsgroups: comp.lang.ada Subject: Re: Some general help with Ada Date: 10 Mar 2002 00:57:30 GMT Organization: Oklahoma State University Message-ID: References: Reply-To: starner@okstate.edu NNTP-Posting-Host: x8b4e555e.dhcp.okstate.edu User-Agent: slrn/0.9.7.3 (Linux) Xref: archiver1.google.com comp.lang.ada:21004 Date: 2002-03-10T00:57:30+00:00 List-Id: On Sat, 9 Mar 2002 19:46:38 -0000, chris.danx wrote: > "Jim" wrote in message > news:ab6237e2.0203091102.103d54e9@posting.google.com... >> how do you create a blank screen like the CLS command in Qbasic/DOS ? >> >> can you do it with text_io ? > > ada.text_io.new_line (26); is quick and easy. And wrong. There's no guarentee that the terminal is only 26 lines tall. I frequently work in terminals 50 lines tall, for example. It will also look very different from clearing the screen on some terminals. There is no way to do this in standard Ada that will always work. Ada.Text_IO.Put (ASCII.ESC & "[2J"); will work on ANSI terminals, including ANSI.SYS on DOS. You might want to look at the GNAT examples; that has a very simple terminal package in it. For bigger stuff, you probably want to look at the Ada binding to NCurses included in the package. -- David Starner - starner@okstate.edu "It's not a habit; it's cool; I feel alive. If you don't have it you're on the other side." - K's Choice (probably refering to the Internet)