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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,62ab88cac7a1dbb X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.180.106.102 with SMTP id gt6mr21561wib.0.1348190011399; Thu, 20 Sep 2012 18:13:31 -0700 (PDT) Path: q11ni3492521wiw.1!nntp.google.com!feeder1.cambriumusenet.nl!feeder3.cambriumusenet.nl!feed.tweaknews.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!border2.nntp.ams2.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!newsreader4.netcologne.de!news.netcologne.de!newsfeed.kamp.net!newsfeed.kamp.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Gnat Sockets & Streams Date: Sun, 16 Sep 2012 00:14:33 +0100 Organization: A noiseless patient Spider Message-ID: References: <201209142101005065-rblove@airmailnet> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="a9272c9c584810f74e3f95ce46cbeceb"; logging-data="4621"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18di8lhMs582+TnOFYaVes70SysgOcmsyI=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (darwin) Cancel-Lock: sha1:Y7yftvQFS37LyS2fwaQanm+creM= sha1:0JZLYyTxZGYiNXKbWx2Bbx/CfGI= Content-Type: text/plain Date: 2012-09-16T00:14:33+01:00 List-Id: Simon Wright writes: > Robert Love writes: > >> The string comes over 1 character at at time. I've looked over the >> code to see that I used the package exactly like the example. I've >> had coworkers look it over. We don't see any way the >> >> String'Output(Channel, "Dummy Data"); >> >> can output the data one character at a time. [...] > That is, I believe, the behaviour specified by the ARM[1], paras 25..27 > and 9. > > This happened to me a long time ago, I thought AdaCore had implemented > an optimisation for strings. As far as I can tell, they have (GCC 4.6/4.7, GNAT GPL 2011/2012). I was outputting to an instrumented memory stream, but I don't see how that would make a difference. I wrote String'Output (Str'Access, "hello"); and received 4 bytes (lower bound), 4 bytes (upper bound), 5 bytes ("hello").