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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4f2fbbc8fcc04a9f X-Google-Attributes: gid103376,public From: "John J. Cupak Jr." Subject: Re: Clear Screen command Date: 1998/03/05 Message-ID: <34FEEF89.41C67EA6@swl.msd.ray.com>#1/1 X-Deja-AN: 331162754 References: <6dl8le$7b6$1@tuvoc.udayton.edu> Mime-Version: 1.0 To: Jeremy Mlazovsky Content-Type: multipart/mixed; boundary="------------167EB0E72781E494446B9B3D" Organization: Raytheon Company Newsgroups: comp.lang.ada Date: 1998-03-05T00:00:00+00:00 List-Id: This is a multi-part message in MIME format. --------------167EB0E72781E494446B9B3D Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Jeremy Mlazovsky wrote: > > I'm sorry, I forgot to add a few details... > > I am using GNAT 3.01 or whatever the most recent version is. > > I'm using ADA95 > > I am using ADAGIDE v6.10c on Windows 95 machine with 32 megs of RAM > > After posting my last message, I found a simple CLEARSCREEN procedure in a > package included with GNAT. I'll use that unless some one knows how to do > it better. Thanks > > Jeremy > > mlazovjp@flyernet.udayton.edu Yup, you can use the attached Ada 95 packages and child packages. You can figure out how to encapsulate the other screen controls in like manner -- -------------------------------------------------------------- - John J. Cupak Jr, CCP - - Raytheon Systems Company - Software Engineering Laboratory - - tel: 508-858-1222 email (work): jcj@swl.msd.ray.com - - fax: 508-858-4336 email (home): jcupak@aol.com - -------------------------------------------------------------- --------------167EB0E72781E494446B9B3D Content-Type: text/plain; charset=us-ascii; name="screen.ads" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="screen.ads" ---------------------------------------------------------------------- -- The Screen Package (Specification) -- -- Programmer : John Cupak -- History : 6Oct97 jcj Created -- 17Oct97 jcj "Base" types package -- Description: This package defines the xterm/VT100 size ---------------------------------------------------------------------- package Screen is Maximum_Rows : constant := 24; Maximum_Columns : constant := 80; subtype Rows is Positive range 1..Maximum_Rows; subtype Columns is Positive range 1..Maximum_Columns; private -- Define constant for use by all child packages -- Command Sequence Introducer (CSI) -- (provides screen command prefix) CSI : constant String := ASCII.ESC & "["; end Screen; --------------167EB0E72781E494446B9B3D Content-Type: text/plain; charset=us-ascii; name="screen-cursor.ads" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="screen-cursor.ads" ---------------------------------------------------------------------- -- The Screen Cursor Control Child Package (Specification) -- -- Programmer : John Cupak -- History : 17Oct97 jcj Created -- Description: Moves cursor from current position ---------------------------------------------------------------------- package Screen.Cursor is -- Move cursor "By" times - stop at top procedure Up (By : in Positive := 1); -- Move cursor down "By" times - stop at bottom procedure Down (By : in Positive := 1); -- Move cursor right "By" times - stop at far right procedure Right(By : in Positive := 1); -- Move cursor left "By" times - stop at far left procedure Left (By : in Positive := 1); -- Set cursor position - Column=X, Row=Y procedure Position(Column : Columns; Row : Rows ); -- Line -- Set cursor home (1,1) procedure Home; end Screen.Cursor; --------------167EB0E72781E494446B9B3D Content-Type: text/plain; charset=us-ascii; name="screen-cursor.adb" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="screen-cursor.adb" with Ada.Text_IO; with Ada.Integer_Text_IO; use Ada.Text_IO; use Ada.Integer_Text_IO; package body Screen.Cursor is procedure Up (By : in Positive := 1) is begin Put(CSI);Put(By,0);Put("A"); end Up; procedure Down (By : in Positive := 1) is begin Put(CSI);Put(By,0);Put("B"); end Down; procedure Right(By : in Positive := 1) is begin Put(CSI);Put(By,0);Put("C"); end Right; procedure Left (By : in Positive := 1) is begin Put(CSI);Put(By,0);Put("D"); end Left; procedure Position(Column : in Columns; Row : in Rows ) is begin Put(Item => CSI); Put(Item => Row, Width => 0); Put(Item => ';'); Put(Item => Column, Width => 0); Put(Item => 'H'); end Position; procedure Home is begin Put(CSI & "H"); end Home; end Screen.Cursor; --------------167EB0E72781E494446B9B3D--