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,fa56c83118d748b8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-04-19 09:25:00 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: aurele.vitali@sympatico.ca (Aurele Vitali) Newsgroups: comp.lang.ada Subject: Re: GNAT Ada - Clear Screen Date: 19 Apr 2003 09:25:00 -0700 Organization: http://groups.google.com/ Message-ID: <5600f988.0304190824.677aa701@posting.google.com> References: <9e6oa.5034$8g5.77486@news2.e.nsc.no> NNTP-Posting-Host: 216.209.239.68 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1050769500 25436 127.0.0.1 (19 Apr 2003 16:25:00 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 19 Apr 2003 16:25:00 GMT Xref: archiver1.google.com comp.lang.ada:36308 Date: 2003-04-19T16:25:00+00:00 List-Id: "Tarjei T. Jensen" wrote in message news:<9e6oa.5034$8g5.77486@news2.e.nsc.no>... > "Fingertip" wrote: > > I am using a GNAT Ada compiler, and I want to be able to clear the console > > window. > > There is a solution. You will have to search this newsgroup. Search this > group for the name "Jerry van Dijk". He has created a NT console package. > > BTW I have not used it. > > greetings, Here a quick way of clearing the screen on NT: function Command_Interpreter( Command : in Interfaces.C.Strings.Chars_Ptr ) return Interfaces.C.Int; pragma import( c, Command_Interpreter, "system" ); -- Set_Console_Mode: This function sets the number of lines and columns procedure Set_Console_Mode is iResult : Interfaces.C.Int; begin iResult := Command_Interpreter( Interfaces.C.Strings.New_String( "MODE CON COLS=80 LINES=25" ) ); end Set_Console_Mode; -- Clear_Screen: This function clears the screen procedure Clear_Screen is iResult : Interfaces.C.Int; begin iResult := Command_Interpreter( Interfaces.C.Strings.New_String( "CLS" ) ); end Clear_Screen; Cheers Aurele