comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Re: adasockets and adatypes
Date: 04 Sep 2001 23:12:18 +0100
Date: 2001-09-04T22:12:19+00:00	[thread overview]
Message-ID: <x7vpu96ehbx.fsf@smaug.pushface.org> (raw)
In-Reply-To: 9n2lpb$c7b$1@nh.pace.co.uk

"Marin David Condic" <dont.bother.mcondic.auntie.spam@[acm.org> writes:

> Note that while I may complain about this from time to time, you're
> still better off than you are with C in the same situation. In C you
> have very little control over representation and in general just
> have to rely on the fact that most C compilers choose to do things
> basically the same way. The one advantage C has in this area is that
> it is at least simpler to take just about any data structure and
> treat it as raw bytes. You can get there in Ada, but it does require
> more work.

I would have thought the ideal non-automated C way of doing this would
be to define a wire format that is convenient for manipulating
endianness (eg, no packing) and manually stuff this on the way
out/unstuff on the way in. Far less dangerous than trying to
manipulate packed data.

Sometimes the transport mechanism forces you to use the same length
for every component -- eg, X properties, where you can choose 1/2/4
byte length and the server byteswaps for you.



  reply	other threads:[~2001-09-04 22:12 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-04 10:53 adasockets and adatypes Tony Gair
2001-09-04 11:37 ` David C. Hoos, Sr.
2001-09-04 12:17   ` Florian Weimer
2001-09-04 14:55     ` David C. Hoos
2001-09-04 15:33       ` Ted Dennison
2001-09-04 15:53         ` David C. Hoos
2001-09-04 18:53           ` Ted Dennison
2001-09-04 20:44             ` David C. Hoos
2001-09-04 21:35               ` Ted Dennison
2001-09-04 15:58         ` Marin David Condic
2001-09-05  9:13   ` Tony Gair
2001-09-04 12:02 ` Marc A. Criley
2001-09-04 13:43 ` Marin David Condic
2001-09-04 22:12   ` Simon Wright [this message]
2001-09-06  7:04     ` Ole-Hjalmar Kristensen
2001-09-07 13:16       ` Peter Dulimov
2001-09-07 14:46         ` Ted Dennison
2001-09-08  5:51         ` Simon Wright
2001-09-06 14:16     ` Marin David Condic
replies disabled

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