www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - structure alignment

reply novice2 <novice2_member pathlink.com> writes:
Hello.
I need explicit set align in structure, because of structure contain data from
external dll. So i need alignment=1. I found in docs
http://www.digitalmars.com/d/struct.html : "alignment can be explicitly
specified".
But how i can do it? What is the syntax?

Thanks
Dec 09 2004
parent "Regan Heath" <regan netwin.co.nz> writes:
On Thu, 9 Dec 2004 12:14:39 +0000 (UTC), novice2  
<novice2_member pathlink.com> wrote:
 Hello.
 I need explicit set align in structure, because of structure contain  
 data from
 external dll. So i need alignment=1. I found in docs
 http://www.digitalmars.com/d/struct.html : "alignment can be explicitly
 specified".
 But how i can do it? What is the syntax?

It's in the Attributes section: http://www.digitalmars.com/d/attribute.html#align It should probably (at least) be linked to from the struct/union section as it's not obvious where it is. Regan
Dec 09 2004