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,e61c8636ef35379d X-Google-Attributes: gid103376,public From: Marin David Condic Subject: Re: Ada Streams usage (was Escape Sequences in Strings) Date: 2000/11/18 Message-ID: <3A168546.89CA38F7@acm.org>#1/1 X-Deja-AN: 695085133 Content-Transfer-Encoding: 7bit References: <3A17B0E2@MailAndNews.com> <3A129A89.1B69E2FE@acm.org> <3A13D59E.63A6F92@earthlink.net> X-Accept-Language: en X-Server-Date: 18 Nov 2000 13:33:06 GMT Content-Type: text/plain; charset=us-ascii Organization: Quadrus Corporation Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-11-18T13:33:06+00:00 List-Id: Brian Orpin wrote: > I looked at using this for connecting to an RS232 port (PC and Sun > Box) but failed miserably and have not had time to go back to it. I > got some stuff from Marin but never really persued it. Any tips or > even code that works . My biggest problem was that I am fine on 83 > but have not yet got my head around all the 95 stuff. > Yeah, there is a lot of "new flavor" to 95 that requires getting your brain wrapped around it. It can be hard getting used to the inheritance thing and streams definitely need this understanding. The trick to streams is understanding that when you derive from the base stream package, you are creating a Read and Write that explain what to do with arbitrary bytes as they become available. (Put them in a buffer, feed them to a communications port, drop them on the floor, whatever.) Then whenever you use the 'Read and 'Write attribute of some type, the compiler figures out how to bust it up into bytes and send them to the Read and Write you provided. There's obviously a lot more to know and the Devil is always in the details. But basically, that's the story. I may have some code around here that I could trim down into an example. Let me know if that might help... MDC -- ====================================================================== Marin David Condic - Quadrus Corporation - http://www.quadruscorp.com/ Send Replies To: m c o n d i c @ q u a d r u s c o r p . c o m Visit my web site at: http://www.mcondic.com/ "Giving money and power to Government is like giving whiskey and car keys to teenage boys." -- P. J. O'Rourke ======================================================================