Next: Accessing Fields, Previous: Struct Comparison, Up: Structs [Contents][Index]
By default fields are accessed in IO space using the current default endianness. However, it is possible to annotate integral fields with an explicit endianness, like in:
type Foo = struct { little int a; big int b; int c; };
In the example above, the field a
will be stored using
little-endian, the field b
will be stored using big-endian, and
the field c
will be stored using whatever current endianness.