Next: , Previous: , Up: Structs   [Contents][Index]


14.5.4 Field Endianness

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.