From: kst@alsys.com (Keith Thompson)
Subject: Re: GOTOXY in Ada ?
Date: Mon, 12 Dec 1994 08:45:23 GMT
Date: 1994-12-12T08:45:23+00:00 [thread overview]
Message-ID: <D0owBn.335@alsys.com> (raw)
In-Reply-To: 3c8lsq$rhu@Starbase.NeoSoft.COM
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)
next prev parent reply other threads:[~1994-12-12 8:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-12-07 12:36 GOTOXY in Ada ? Jan Ahlers
1994-12-08 13:04 ` Philip Brashear
1994-12-09 4:19 ` Dave Retherford
1994-12-12 8:45 ` Keith Thompson [this message]
1994-12-13 10:09 ` Andre Spiegel
1994-12-09 2:59 ` Michael Feldman
1994-12-09 15:22 ` Do-While Jones
1994-12-10 21:00 ` Michael Feldman
-- strict thread matches above, loose matches on Subject: below --
1994-12-20 2:06 GOTOXY IN ADA ? Michael Hagerty
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox