[TUHS] early cc variable and function names

Ron Natalie ron at ronnatalie.com
Sun Oct 19 09:03:21 AEST 2014


The assembler could handle 8 case independent symbols.   C prepended an underscore to avoid any symbol conflicts.    If I recall the compiler allowed longer symbols but it just lost those letters after 7.

Amusingly an early IBM 370 compiler omitted prepending the underscore which lead to hilarity when you declared variables called things like R15.

On Oct 18, 2014, at 6:32 AM, Noel Chiappa <jnc at mercury.lcs.mit.edu> wrote:

>> From: Greg 'groggy' Lehey <grog at lemis.com>
> 
>> This is really an identifier issues
> 
> Probably actually a function of the relocatable object format / linker on the
> machines in question, which in most (all?) cases predated C itself.
> 
>> it's documented in K&R 1st edition, page 179:
> 
> Oooh, good piece of detective work!
> 
>    Noel
> _______________________________________________
> TUHS mailing list
> TUHS at minnie.tuhs.org
> https://minnie.tuhs.org/mailman/listinfo/tuhs



More information about the TUHS mailing list