comp.lang.ada
 help / color / mirror / Atom feed
From: Poul-Erik Andreasen <poulerik@pea.dk>
Subject: Re: TCP/IP Sockets with GNAT.Sockets
Date: Tue, 03 May 2005 15:00:57 +0200
Date: 2005-05-03T15:00:57+02:00	[thread overview]
Message-ID: <42777609$0$142$edfadb0f@dread11.news.tele.dk> (raw)
In-Reply-To: <m2wtqhqwad.fsf@grendel.local>

Simon Wright wrote:
> Poul-Erik Andreasen <poulerik@pea.dk> 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 :-)



  reply	other threads:[~2005-05-03 13:00 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-02  2:42 TCP/IP Sockets with GNAT.Sockets fabio de francesco
2005-05-02  5:58 ` Eric Jacoboni
2005-05-02 12:11 ` Adrien Plisson
2005-05-02 14:55   ` fabio de francesco
2005-05-02 16:10     ` Adrien Plisson
2005-05-02 17:56       ` Eric Jacoboni
2005-05-02 18:30         ` Poul-Erik Andreasen
2005-05-02 19:10           ` Simon Wright
2005-05-03 13:00             ` Poul-Erik Andreasen [this message]
2005-05-03 21:48               ` Simon Wright
2005-05-04  8:01               ` Character'First, ASCII.NUL and others (Was: Re: TCP/IP Sockets with GNAT.Sockets) Adrien Plisson
2005-05-04 13:40                 ` Poul-Erik Andreasen
2005-05-02 20:37           ` TCP/IP Sockets with GNAT.Sockets fabio de francesco
2005-05-02 20:52             ` Adrien Plisson
2005-05-03 12:04               ` fabio de francesco
2005-05-03 12:22                 ` Adrien Plisson
2005-05-03 13:17             ` Poul-Erik Andreasen
2005-05-02 20:44         ` Adrien Plisson
2005-05-02 22:10           ` Eric Jacoboni
2005-05-02 23:42             ` tmoran
2005-05-02 19:39     ` Björn
2005-05-02 20:22       ` fabio de francesco
2005-05-09  4:03         ` Dave Thompson
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox