Is typedef char BUFFER[20] legal?

Hascall John Paul john at IASTATE.EDU
Sat Mar 2 03:36:08 AEST 1991


In article <1991Jan29.210100.8105 at zoo.toronto.edu>, henry at zoo.toronto.edu (Henry
Spencer) writes:
> In article <1212 at tredysvr.Tredydev.Unisys.COM>
paul at tredysvr.Tredydev.Unisys.COM (Paul Siu) writes:

> >Can anyone also tell me what is the most common style convention for type
> >names, I usually put them all in capitals.

> Insofar as there is a consensus, it's to put them in lower case with a
> suffix "_t", e.g. "uid_t" as the type for userids.

   Nice; until some standards body steals your name out from under you.
Not to start ``style wars'' again, but another common scheme is:

#define FOO 4
typedef struct {
      char    f_thing;
      int     f_thang[FOO];
} Foo;                        (or FooType, or fooType)
Foo foo;

--
John Hascall                        An ill-chosen word is the fool's messenger.
Project Vincent
Iowa State University Computation Center                       john at iastate.edu
Ames, IA  50011                                                  (515) 294-9551



More information about the Comp.lang.c mailing list