D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] GCC compilation?



On 18-Jan-2002 at 19:45:05 lee quick wrote:
i write a source file say : Example.c
then  GCC Example.c
produces an executable called a.out ?

sure enough a.out works but why is it not called Example.out

Well, going back a *long* way, when I was at Uni, we used PDP computers to
learn assembler language. The binary produced by a program was literally
'dumped' out by the system and called 'a.out' - i.e. the assembler crashed
and dumped the assembled code. That was your program. Since C stems from
these early days, I would say the use of 'a.out' was a legacy of those
times. Why it was actually called 'a.out', as opposed' to 'b.out' or just
'output', I couldn't say for sure. Perhaps it was because one of the
precursors to C was the language 'A', so output from it would be 'a.out'?
Perhaps for C it should have changed to 'c.out' :-)


I suspect something like the Kernighan and Ritchie C book would say
something about this (in the preface perhaps). My copy is at home, so I
can't say for sure. And as always I could be wrong about this :-)



Regards,

John.

------------------------------------------------------------------------
John Horne, University of Plymouth, UK           Tel: +44 (0)1752 233914
E-mail: jhorne@xxxxxxxxxxxxxx
PGP key available from public key servers

--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.


Lynx friendly