Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site 3comvax.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!lll-crg!ucdavis!ucbvax!decvax!decwrl!Glacier!oliveb!3comvax!mikes From: mikes@3comvax.UUCP (Mike Shannon) Newsgroups: net.lang.c Subject: Re: Multiple Entry Points in C Message-ID: <270@3comvax.UUCP> Date: Wed, 6-Nov-85 17:24:26 EST Article-I.D.: 3comvax.270 Posted: Wed Nov 6 17:24:26 1985 Date-Received: Sat, 9-Nov-85 07:04:48 EST References: <2801@brl-tgr.ARPA> Organization: 3Com Corp; Mountain View, CA Lines: 18 Regarding how to do: > > subroutine a(i,j) > > i = j/i > > entry b(i,j) > > i = i + j > > return > > end > > But I am at a loss as to how to express this in C. Any hints > > or pointers [:-)] will be appreciated.... > > You cannot do this directly, but you can achieve the same effect by > specifying an extra arg specifying which entry you want. Then use it > in a switch statement to select the proper processing. I don't buy it; make 'b' a procedure, which can be called by 'a' or called directly by someone else. -- Michael Shannon {ihnp4,hplabs}!oliveb!3comvax!mikes