next up previous contents
Next: Properties and Restrictions Up: tex2html_wrap_inline1418 - C and Previous: Syntax

Example :

A typical example of such a memory-object is :

struct {
 int n = 12;      /* A number, with a default value */
 union {
  float F[2*2];   /* A 2x2 matrix represented as a mono-dimensional array */
  float F00, F01,
        F10, F11; /* The same matrix represented with scalars */
 };               /* Please note that the name of the union is optional */
 other_struct s   /* Another struct defined elsewhere ... */
  = { 12, 1, 3 }, /*  ... with some initialization */
 struct {
  lsw  : 0;
  mswb : 16;
 } m;             /* A 32bits word defined as a struct of 
                     two 16bits words */
} mystruct;       /* The name of the defined memory object */



Soraya Arias
Mon Aug 5 17:38:44 MET DST 1996