Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!ogicse!unmvax!bbx!bbxsda!scott From: scott@bbxsda.UUCP (Scott Amspoker) Newsgroups: comp.lang.c Subject: Re: Is typedef char BUFFER[20] legal? Keywords: typedef, legality, style Message-ID: <1701@bbxsda.UUCP> Date: 5 Feb 91 22:21:47 GMT References: <1212@tredysvr.Tredydev.Unisys.COM> Reply-To: scott@bbxsda.UUCP (Scott Amspoker) Organization: Basis International, Albuquerque, NM Lines: 19 In article <1212@tredysvr.Tredydev.Unisys.COM> paul@tredysvr.Tredydev.Unisys.COM (Paul Siu) writes: >Is the following statements legal in K&R C, and ANSI C? > typedef char BUFFER[20]; > BUFFER sb; >This seems to work on both the K&R compiler and the ANSI compiler at my work >place, but is this going to break when the program is ported? Looks good to me but you never know how bad some compilers can be. >Can anyone also tell me what is the most common style convention for type >names, I usually put them all in capitals. You're not alone here. We tend to use uppercase names for typedefs also. -- Scott Amspoker | Basis International, Albuquerque, NM | This space available (505) 345-5232 | unmvax.cs.unm.edu!bbx!bbxsda!scott |