AT&T 7300 C Compiler/variable name lengths

J. Wong wong at rtech.ARPA
Wed Apr 17 08:07:34 AEST 1985

> From: rim (Roderick McAllery)
> > .... In general I have found
> > that using only 7 character names is safest, ie. guarantees uniqness. 
> > 
> > ...Personally, I would stick to a maximum of 7 chars for a variable
> > name. I find long names very annoying and subject to typos. Yes this means
> > more cryptic names, but the solution is to put COMMENTS in your C code.
> Personally I would rather have clarity than trying to decipher someones cute 
> little acronyms if I had to maintain a piece of code.  
> ---

Actually, most C compilers accept identifiers of any length.  So you are not
limited in having non-cryptic names.  However, some assemblers and linkers
make the restriction to only recognizing the first n characters.  Thus, only
the first n characters need be unique, the actual name can be longer.
				J. Wong		ucbvax!mtxinu!rtech!wong

You start a conversation, you can't even finish it.
You're talking alot, but you're not saying anything.
When I have nothing to say, my lips are sealed.
Say something once, why say it again.		- David Byrne

More information about the Comp.lang.c mailing list