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: 103376,7db5fb0599fd4b76 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news4.google.com!news.glorb.com!news.tele.dk!not-for-mail Date: Tue, 03 May 2005 15:00:57 +0200 From: Poul-Erik Andreasen User-Agent: Mozilla Thunderbird 0.8 (X11/20040926) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: TCP/IP Sockets with GNAT.Sockets References: <1115001752.291144.218410@z14g2000cwz.googlegroups.com> <427618e9$0$7743$ba620e4c@news.skynet.be> <1115045740.838321.306480@g14g2000cwa.googlegroups.com> <42765108$0$22419$ba620e4c@news.skynet.be> <020520051956181888%jaco@neottia.net> <427671d4$0$166$edfadb0f@dread11.news.tele.dk> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <42777609$0$142$edfadb0f@dread11.news.tele.dk> Organization: TDC Totalloesninger NNTP-Posting-Host: 80.166.145.174 X-Trace: 1115125258 dread11.news.tele.dk 142 80.166.145.174:14919 X-Complaints-To: abuse@post.tele.dk Xref: g2news1.google.com comp.lang.ada:10896 Date: 2005-05-03T15:00:57+02:00 List-Id: Simon Wright wrote: > Poul-Erik Andreasen writes: > > >>BTW my C-couterpart program dosn't seems to have anything against >>String'Output( Channel, "Hello" & character'first) ? > > > Well, that _ought_ to send > > (a) 4 bytes == 1, which is the lower index of the string > (b) 4 bytes == 6, which is the upper index of the string > (c) the null-terminated string. > So it depends what your C-counterpart did with those strange > characers. It probely just trow them away, i think the reson why is not a problem is that besides being zero terminated the the messages that i sent are requered to start with '$', Anyway i will, ofcourse change to string'write > > Why do you say Character'First & not ASCII.NUL? Not for any partikulari reason. When i started developing job i tried with ASCII.NUL things didn't work out(surely for som other reason); they did when i first was using character'first. (also surely for som other reason); Are there any reason why ASCII.NUL should be better; ASCII.NUL are defined as Character'First; > If you don't want to include the bounds, use 'Write. I will > There's nothing wrong with streams, but you do have to know exactly > what the language requires the compiler to do! Therefor this is realy a nice thread :-)