[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]


align

Description:

Specifies how to align data.

Compatibility:

This pragma is compatible with the following platform targets:

68K

PowerPC

NEC V800
Intel x86

MIPS

Embedded 68K

Prototype:
  #pragma options align= alignment Remarks:

This pragma specifies how to align structs and classes, where alignment can be one of the following values:

If alignment is
The compiler
mac68k  
Aligns every field on a 2-byte boundaries, unless a field is only 1-byte long. This is the standard alignment for 68K Macintosh computers.  
mac68k4byte  
Aligns every field on 4-byte boundaries.  
power  
Align every field on its natural boundary. This is the standard alignment for Power Macintosh computers. For example, it aligns a character on a 1-byte boundary and a 16-bit integer on a 2-byte boundary. The compiler applies this alignment recursively to structured data and arrays containing structured data. So, for example, it aligns an array of structured types containing an 4-byte floating point member on an 4-byte boundary.  
native  
Aligns every field using the standard alignment. It is equivalent to using mac68k for 68K Macintosh computers and power for Power Macintosh computers.  
packed  
Aligns every field on a 1-byte boundary. It is not available in any settings panel. This alignment will cause your code to crash or run slowly on many platforms. Use it with caution.  
reset  
Resets the option to the value in the previous #pragma options align statement, if there is one, or to the value in the 68K or PPC Processor settings panel.  

Note there is a space between options and align.

This pragma corresponds to the Struct Alignment option in the 68K Processor settings panel.


[ First ]  [ Previous ]  [ Next ]  [ Last ]  [ Manuals ]

Visit the Metrowerks website at: http://www.metrowerks.com
For assistance contact Metrowerks Technical Support at: cw_support@metrowerks.com
Copyright © 2000, Metrowerks Corp. All rights reserved.

Last updated: August 17, 2000