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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ff34bb99bda04ad7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-12-12 02:14:10 PST Newsgroups: comp.lang.ada Path: bga.com!news.sprintlink.net!hookup!olivea!news.hal.COM!decwrl!netcomsv!netcomsv!telesoft!kst From: kst@alsys.com (Keith Thompson) Subject: Re: GOTOXY in Ada ? Message-ID: Originator: kst@pulsar Sender: news@alsys.com (USENET News Admin @flash) Organization: Alsys, San Diego, CA, USA References: <3c4a9a$1lts@obelix.uni-muenster.de> <1994Dec8.080423.3368@sei.cmu.edu> <3c8lsq$rhu@Starbase.NeoSoft.COM> Date: Mon, 12 Dec 1994 08:45:23 GMT Date: 1994-12-12T08:45:23+00:00 List-Id: In <3c8lsq$rhu@Starbase.NeoSoft.COM> daver@Starbase.NeoSoft.COM (Dave Retherford) writes: > Or you could 'roll your own' version: > > -------- > > package cursor_control is > procedure gotoxy(x : in positive_count, y : in positive_count); > end cursor_control; > > with text_io; > package body cursor_control is > > procedure gotoxy(x : in positive_count, y : in positive_count) is > begin > text_io.set_col(to => x); > text_io.set_line(to => y); > end gotoxy; > > end cursor_control; Sorry, this won't work. The Set_Col and Set_Line routines won't move the cursor to a previous line or to a previous column on the current line. For example, if the current column number is 20, Text_IO.Set_Col(10) will call New_Line and then output 10 spaces; likewise, Set_Line calls New_Page if necessary (which may or may not clear the screen; typically it won't). Note that some Unix Ada compilers provide an interface to the curses library. -- Keith Thompson (The_Other_Keith) kst@alsys.com TeleSoft^H^H^H^H^H^H^H^H Alsys, Inc. 10251 Vista Sorrento Parkway, Suite 300, San Diego, CA, USA, 92121-2718 /user/kst/.signature: I/O error (core dumped)