Multiple Entry Points in C

Mike Shannon mikes at 3comvax.UUCP
Thu Nov 7 08:24:26 AEST 1985


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



More information about the Comp.lang.c mailing list