digitalmars.D - Struct member alignment for external data formats??
- Tony (6/6) Nov 14 2008 I'm reading a very old feature list of D and it says that D has struct
- Kagamin (3/9) Nov 14 2008 It's easy to use feature. Custom serialization is needed on a higher lev...
- Tony (8/18) Nov 14 2008 In my reading of D features, I thought I saw 3 alignment control mechani...
- Jarrett Billingsley (2/13) Nov 14 2008 Then you probably saw wrong. There's just 'align'.
I'm reading a very old feature list of D and it says that D has struct member alignment control "to ensure compatibility with externally imposed data formats". So, questions: 1. How does one use that? 2. Is it accepted practice in D programming to write/read structs to/fro, say a disk file, without marshalling? Tony
Nov 14 2008
Tony Wrote:I'm reading a very old feature list of D and it says that D has struct member alignment control "to ensure compatibility with externally imposed data formats". So, questions: 1. How does one use that?align attribute2. Is it accepted practice in D programming to write/read structs to/fro, say a disk file, without marshalling?It's easy to use feature. Custom serialization is needed on a higher level, say when saving "document".
Nov 14 2008
"Kagamin" <spam here.lot> wrote in message news:gfk16c$1bmq$1 digitalmars.com...Tony Wrote:In my reading of D features, I thought I saw 3 alignment control mechanisms (?).I'm reading a very old feature list of D and it says that D has struct member alignment control "to ensure compatibility with externally imposed data formats". So, questions: 1. How does one use that?align attributeSo the answer then is 'yes'? Others chime in too please, this is a key issue/feature (hehe, which is it? Speak your opinions!). Tony2. Is it accepted practice in D programming to write/read structs to/fro, say a disk file, without marshalling?It's easy to use feature. Custom serialization is needed on a higher level, say when saving "document".
Nov 14 2008
On Fri, Nov 14, 2008 at 11:28 PM, Tony <tonytech08 gmail.com> wrote:"Kagamin" <spam here.lot> wrote in message news:gfk16c$1bmq$1 digitalmars.com...Then you probably saw wrong. There's just 'align'.Tony Wrote:In my reading of D features, I thought I saw 3 alignment control mechanisms (?).I'm reading a very old feature list of D and it says that D has struct member alignment control "to ensure compatibility with externally imposed data formats". So, questions: 1. How does one use that?align attribute
Nov 14 2008