Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!elroy.jpl.nasa.gov!ncar!gatech!psuvax1!psuvm!esoc!kkeyte From: KKEYTE@ESOC.BITNET (Karl Keyte) Newsgroups: comp.std.c Subject: Re: Representation Clauses Message-ID: <91049.103447KKEYTE@ESOC.BITNET> Date: 18 Feb 91 11:35:39 GMT References: <91042.160311KKEYTE@ESOC.BITNET> <15187@smoke.brl.mil> <91045.112247KKEYTE@ESOC.BITNET> <15211@smoke.brl.mil> Lines: 31 Organisation: European Space Operation Centre (E.S.O.C) >>Actually, being able to specify a structure's element alignment >>DOES guarantee portability. >No, I stand by what I said. While, using the technique you suggest, >structure member alignment would be a NECESSARY condition for >portability, it would not be SUFFICIENT. You're pre-judging here. You're making assumptions as to what kind of data is being transferred. For many applications, the alignment WOULD be adequate. It may be all bit-fields and integers. If there's a risk of byte ordering problems in integers, one single flag byte could be used to identify the scheme adopted at the source end. >>If you know you receive an IEEE standard FP number in a particular >>element then you can convert as appropriate. >This has not been my experience, and it certainly does not apply to >multi-byte integral types. The '>>' line is taken out of context! Anyway, it's true! If you transfer data according to IEEE formats, there is NO possible ambiguity even in the representation of integers - a standard is defined for that. >>It's a shortfall of the standard as far as I'm concerned. >You're entitled to your opinion about that. I disagree. Like I said, let's leave 'C' alone then. I should re-direct the discussion to the C++ forum, which is a language still undergoing evolution. Karl