[net.lang.c] the 'entry' reserved word

oyster@uwmacc.UUCP (Vicious Oyster) (11/05/85)

In article <2806@brl-tgr.ARPA> bilbo.niket@LOCUS.UCLA.EDU (Niket K. Patwardhan) writes:
>
>BTW, original K&R C had "entry" defined as a keyword but never told you what
>to do with it! Look it up, you will find it in the list of reserved keywords!

   I've been wondering about that.  Seems to me (that's your cue that this is
*opinion*) that it's more desirable to explicitly declare what can and cannot
be seen outside a module.  This could be done by marking as 'entry' each
variable or function that can be externally referenced.  Now, I'm not about
to argue with the experience that went into the design of C, but I wonder
if that wasn't what was originally considered.

 - Joel Plutchak
   {allegra,ihnp4,seismo}!uwvax!uwmacc!oyster

Can you say "opinion"?  I *knew* you could!

mff@wuphys.UUCP (Swamp Thing) (11/09/85)

In article <1643@uwmacc.UUCP> oyster@uwmacc.UUCP (Vicious Oyster) writes:
>In article <2806@brl-tgr.ARPA> bilbo.niket@LOCUS.UCLA.EDU (Niket K. Patwardhan) writes:
>>
>>BTW, original K&R C had "entry" defined as a keyword but never told you what
>>to do with it! Look it up, you will find it in the list of reserved keywords!
>
>   I've been wondering about that.  Seems to me (that's your cue that this is
>*opinion*) that it's more desirable to explicitly declare what can and cannot
>be seen outside a module.  This could be done by marking as 'entry' each
>variable or function that can be externally referenced.  Now, I'm not about
>to argue with the experience that went into the design of C, but I wonder
>if that wasn't what was originally considered.
>

My guess is that they intended to provide multiple entries into functions, as
in (GASP!) fortran.


						Mark F. Flynn
						Department of Physics
						Washington University
						St. Louis, MO  63130
						ihnp4!wuphys!mff

------------------------------------------------------------------------------

"There is no dark side of the moon, really.
 Matter of fact, it's all dark."

				P. Floyd

ted@cdp.UUCP (11/14/85)

My best guess is that "entry" was a unique symbol which the
loader used to find the entry subroutine which would call
main (or possibly _main as it does in most C implementations
today)?  Dennis Ritchie : what say?

				Ted Goldstein

kenny@uiucdcsb.CS.UIUC.EDU (11/19/85)

/* Written  2:10 am  Nov 14, 1985 by ted@cdp.UUCP in uiucdcsb:net.lang.c */

My best guess is that "entry" was a unique symbol which the
loader used to find the entry subroutine which would call
main (or possibly _main as it does in most C implementations
today)?  Dennis Ritchie : what say?

				Ted Goldstein
/* End of text from uiucdcsb:net.lang.c */

On the AT&T implementation of C on G(E)COS (which predates Un*x), the entry
subroutine was called `.SETU.`. The periods in the name make it syntactically
illegal for C, of course, but there were ways around that.

The 'fortran' keyword was used to specify that the compiler should generate
calls to particular procedures compatible with the calling sequence used by
FORTRAN A (or was it FORTRAN Y?  Was years ago, and I forget).  Something
like

	extern fortran real sine(), cosine();

was used to drag in the trig functions, for instance.

'asm' is still a keyword to many of the compilers, and is used to insert
assembly code into the program, e.g.:

	/*	Now set up fp and sp to use the ppprcs stack space	*/

	asm ("	movl	a3,fp");
	asm ("	movl	a3,sp");

It was invented to allow even the really cruddy low-level stuff to be written
at least partially in C.

Opinions expressed herein are those of the daemon possessing my terminal.

Kevin Kenny
kenny@Uiuc.ARPA		kenny@Uiuc.CSNET	
{ihnp4,pur-ee,convex}!uiucdcs!kenny	(UUCP)
Snail: Forget it.