Path: utzoo!yunexus!geac!daveb From: daveb@geac.UUCP (David Collier-Brown) Newsgroups: comp.lang.c Subject: Re: entry (was Re: Pointers to functions) Keywords: entry, C, PL/1 Message-ID: <2444@geac.UUCP> Date: 13 Mar 88 20:55:01 GMT Article-I.D.: geac.2444 Posted: Sun Mar 13 15:55:01 1988 References: <7811@tut.cis.ohio-state.edu- <7689@pur-ee.UUCP> <585@tuvie> <1988Mar11.221528.1392@utzoo.uucp> Reply-To: daveb@geac.UUCP (David Collier-Brown) Organization: The Geac Pl/1.1415 Department Lines: 45 In article <1988Mar11.221528.1392@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes: > It's also not at all clear that it >is particularly useful, which is probably why nobody ever did anything >with the "entry" keyword. It was useful in PL/1 for simulating C-like static-to-file variables and C++-like packages... (sudden thought: ++- should be a new operator in D). It got dropped just about the time it might have proved usefull, much to my relief. C++ is much cleaner than: balanced_binary_tree: procedure returns ptr; begin; declare 1 tree; (2 left, 2 right, 2 ptr) ptr based on (p); on misallocate goto cleanup; allocate (tree) set(p); return p; cleanup: return null; newleft: entry(p,q) returns ptr; begin; declare p, q ptr; if (p->left = null) then do; p->left = balanced_binary_tree; p->left->ptr = q; end do; else do; rebalance(p,q); end do; return p->left; end; ... The Multicians managed to avoid this almost entirely, the unicians left it out of the language and the tune-in-next-weekians found a better way. Never let it be said that we aren't making progress. -- David Collier-Brown. {mnetor yunexus utgpu}!geac!daveb Geac Computers International Inc., | Computer Science loses its 350 Steelcase Road,Markham, Ontario, | memory (if not its mind) CANADA, L3R 1B3 (416) 475-0525 x3279 | every 6 months.