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-08 08:32:39 PST Newsgroups: comp.lang.ada Path: bga.com!news.sprintlink.net!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!news.sei.cmu.edu!ajpo.sei.cmu.edu!brashear From: brashear@ajpo.sei.cmu.edu (Philip Brashear) Subject: Re: GOTOXY in Ada ? Message-ID: <1994Dec8.080423.3368@sei.cmu.edu> Sender: netnews@sei.cmu.edu (Netnews) Organization: None References: <3c4a9a$1lts@obelix.uni-muenster.de> Date: Thu, 8 Dec 1994 08:04:23 EST Date: 1994-12-08T08:04:23-05:00 List-Id: In article <3c4a9a$1lts@obelix.uni-muenster.de> ahlersj@comix.uni-muenster.de (Jan Ahlers) writes: > >Is there an equivalent in Ada to the gotoxy command in Pascal (-> put the >cursor at column x, row y) ? Answers would be greatly appreciated ! > Jan, let me point out that Pascal has no such command either. The particular Pascal implementation (compiler/environment/libraries) that you are using is kind enough to supply you with cursor movement operations. You must realize that such things are completely dependent on the kind of display device you are using. Since Pascal is intended to be portable, the language definition doesn't specify such things. That being said, it should be obvious that Ada doesn't specify cursor control either. However, it's simple enough to write your own, provided that you can track down the appropriate "escape sequences" that make your terminal do what you want. Just do text_io "put" to the screen, sending a string like ASCII.ESC & "[6;14H" If you're using an ANSI standard terminal, will send the cursor to line 6, column 14. DISCLAIMER: I didn't try this precisely -- I depended on memory and an out- of-date reference manual for a particular terminal. Nevertheless, the idea works. I've used it several times. Good hunting! Phil Brashear CTA INCORPORATED