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,343551ac8a3d0216 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1993-03-05 22:13:19 PST Newsgroups: comp.lang.ada Path: sparky!uunet!spool.mu.edu!darwin.sura.net!convex!sercely From: sercely@convex.com (Ron Sercely) Subject: Re: How do I "Get" just 4 characters? Message-ID: <1993Mar5.155545.3071@convex.com> Sender: usenet@convex.com (news access account) Nntp-Posting-Host: cvxcs.convex.com Organization: CONVEX Computer Corporation, Richardson, Tx., USA References: <1993Mar4.232013.6988@convex.com> Date: Fri, 5 Mar 1993 15:55:45 GMT X-Disclaimer: This message was written by a user at CONVEX Computer Corp. The opinions expressed are those of the user and not necessarily those of CONVEX. Date: 1993-03-05T15:55:45+00:00 List-Id: Sorry for the cryptic post. Most of my message was (due to my error) ommited. I do my development on Convex Ada, which is derived from Verdix Ada. On most Verdix systems, I/O requests eventually map to C library calls. The default model used for reads on must Unix system uses line buffering, (so that the delete key works, for example). The way that line buffering is disable is to set the stty mode to cbreak. This package uses commonly supplied Verdix packages to allow a program to set STANDAND_INPUT to cbreak mode, which solves the problem of the orignial post. with Text_IO; with set_tty_modes; procedure test is subtype pin_type is string(1..4); A : pin_type; Num : INTEGER; begin set_tty_modes.set_cbreak; -- inserted line Text_IO.Get(A); Text_Io.New_Line; -- necessary to duplicate the output desired -- by the original poster Text_IO.PUT_LINE(A); set_tty_modes.unset_cbreak; -- inserted line end test; Hope the post makes sense this time :-) Ron Sercely