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,9c86eb13dd395066 X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: CRC in Ada? Date: 1997/03/04 Message-ID: #1/1 X-Deja-AN: 223207911 References: <1997Mar2.220652@nova.wright.edu> <331bf6ce.2832564@news.logica.co.uk> Organization: New York University Newsgroups: comp.lang.ada Date: 1997-03-04T00:00:00+00:00 List-Id: David Brown: <> Are you using stream attributes to read into a string. This is a mistake that I have seen a number of people make. Why a mistake (if you are worrying about efficiency?) Because Ada semantics require element by element processing of arrays (and for a string, the element is a character). Instead use Read and Write directly to read and/or write buffers of stream elements. <> As for buffering, I am not sure what the default is, but you can use setvbuf to control buffering (read the section in the GNAT manual about getting at the underlying streams).