Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!utcsri!flaps From: flaps@utcsri.UUCP Newsgroups: comp.lang.c Subject: Re: reserved word 'entry' Message-ID: <5282@utcsri.UUCP> Date: Thu, 20-Aug-87 11:44:18 EDT Article-I.D.: utcsri.5282 Posted: Thu Aug 20 11:44:18 1987 Date-Received: Sat, 22-Aug-87 08:50:23 EDT References: <402@root44.co.uk> Reply-To: flaps@utcsri.UUCP (Alan J Rosenthal) Organization: University of Toronto Lines: 45 Keywords: entry reserved Summary: In article <402@root44.co.uk> jgh@root.co.uk (Jeremy G Harris) writes: >Does anybody know what the K&R-listed reserved word 'entry' was for? >Anybody have a compiler which uses it? It wasn't for anything, it was one of these 'reserved for future use' things. I don't know of any environment which uses it other than to print "syntax error". I always assumed that it was modeled on the fortran ENTRY keyword, which allows multiple entry points to a function. It's sort of like using fall-throughs in case statements. For an example: the slightly misleading structure int fullcalculation() { ... partialcalculation(); } int partialcalculation() { ... } would be replaced by something like: int fullcalculation() { ... entry partialcalculation; ... } It's not entirely clear what the advantage is. Of course, you don't have to say the formal parameters twice, and they don't have to be pushed on the stack twice, but this could be optimized out as a special case kind of tail recursion anyway by either a very smart compiler, or a compiler implemented by someone who thinks that the 'entry' keyword would make a big difference. ajr