COHERENT manpages

This page displays the COHERENT manpage for struct [Data type].

List of available manpages
Index


struct -- C Keyword

Data type

struct is  a C keyword  that introduces a  structure.  The following  is an
example of how struct can be  used in the description of a name and address
file:

    struct address {
        char firstname[10];
        char lastname[15];
        char street[25];
        char city[10];
        char state[2];
        char zip[5];
        int  salescode;
    };

The  C Programming  Language, second  edition  prohibits the  assignment of
structures, the  passing of structures  to functions, and  the returning of
structures by functions.   COHERENT, however, lifts these restrictions.  It
allows one structure to be assigned to another, provided the two structures
are  of the  same type.   It  also allows  structures to  be passed  by and
returned by functions.  These features are supported by most compilers, but
users should be aware that their  use can cause problems in porting code to
some compilers.

See Also

array,
C keywords,
field,
initialization,
structure
ANSI Standard, §3.1.2.5, §3.5.2.1