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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4b862d91ff93feff X-Google-Attributes: gid103376,public From: "Marin David Condic, 561.796.8997, M/S 731-96" Subject: Re: Text_IO for other standard types Date: 1998/01/12 Message-ID: <98011211182281@psavax.pwfl.com>#1/1 X-Deja-AN: 315291277 Sender: Ada programming language Comments: To: tarjei@online.no X-VMS-To: SMTP%"INFO-ADA@VM1.NODAK.EDU" X-VMS-Cc: SMTP%"tarjei@ONLINE.NO",CONDIC Newsgroups: comp.lang.ada Date: 1998-01-12T00:00:00+00:00 List-Id: "Tarjei T. Jensen" writes: >Oh Horror! With these changes one could write a portable text editor in >Ada without any host specific code. Horrors of horrors; we would be able >to turn off input buffering and get access to each character as they are >typed. Transparantly. > An admirable goal. I'm not sure that the facilities aren't already available in Text_IO to write a transparent text editor (Please make it look like TPU!) but it may be lack of consistent implementation that kills you. You can do cursor motion now by outputting escape sequences - except that you are then dependent on some specific terminal standard (VT100, usually). There is a "Get_Immediate" call which will let you read a keystroke at a time, but my experience is that it's implementation is a little inconsistent/buggy/slow. (Does it require echoing of the character? Shouldn't it not require a CR before reading the keystroke? What about "special" keys, like F-keys, arrows, ctrl, alt, etc?) Again, your code is likely to get hung up on a specific keyboard standard as well. > >It would be very nice to have a stream base standard library. I assume >it would be easy to connect any stream to any sort of I/O (serial, >socket, text files, etc). > Don't forget that there is, in fact support for streams and Stream_IO, the goal of which was to give you exactly the ability you are talking about. Of course there are always limitations on this sort of thing because it becomes very hardware/os dependent. MDC Marin David Condic, Senior Computer Engineer Voice: 561.796.8997 Pratt & Whitney GESP, M/S 731-95, P.O.B. 109600 Fax: 561.796.4669 West Palm Beach, FL, 33410-9600 Internet: CONDICMA@PWFL.COM ============================================================================= "I filled out an application that said, 'In Case Of Emergency Notify'. I wrote 'Doctor'... What's my mother going to do?" -- Steven Wright =============================================================================