/* ECP: FILEname=fig9_27.c */ /* 1*/ #ifndef _Shape /* 2*/ #define _Shape /* 3*/ #include /* 4*/ #include /* 5*/ #define Pi 3.1416 /* 6*/ #define MaxStringLen 80 /* 7*/ typedef struct /* 8*/ { /* 9*/ int TheShape; /*10*/ double Area; /*11*/ union /* Stores The Dimensions Of The Object */ /*12*/ { /*13*/ double Radius; /* Circle */ /*14*/ double Side; /* Square */ /*15*/ struct /* Rectangle */ /*16*/ { /*17*/ double Length; /*18*/ double Width; /*19*/ } Rect; /*20*/ } Dimension; /*21*/ } ShapeType; /*22*/ void WriteShape( const ShapeType * Shape ); /*23*/ void AreaShape( ShapeType * Shape ); /*24*/ ShapeType * ReadShape( void ); /*25*/ #endif