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=3.8 required=5.0 tests=BAYES_00,INVALID_MSGID, RATWARE_MS_HASH,RATWARE_OUTLOOK_NONAME autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,757768dade9c3255 X-Google-Attributes: gid103376,public From: "Jerry van Dijk" Subject: Re: is there a getch() for ada95?? Date: 1996/12/31 Message-ID: <01bbf762$a6d5b660$f22d5c8b@jerryware>#1/1 X-Deja-AN: 207001614 references: <32C869F4.5F20@pcnet.com> organization: *JerryWare HQ*, Haarlem, Holland newsgroups: comp.lang.ada Date: 1996-12-31T00:00:00+00:00 List-Id: Micheal, > And I'm trying to create a small package to handle > console i/o. Unfortunately, that is difficult to answer without knowing which compiler/operating system you are using. If, for example, you are using GNAT on DOS (which I suspect) the answer is that there are several posibilities for console I/O. In general though, if you are using GNAT, you can call the C library function getch() from Ada, like in: with Ada.Text_IO; use Ada.Text_IO; procedure Test is function getch return Integer; pragma Import (C, getch); begin Put ("Press a key: "); Put_Line ("You pressed a key with scancode" & Integer'Image(getch)); end Test; with the best wishes for the new year! Jerry.