Subroutine layout in C
phil at uxg.cso.uiuc.edu
phil at uxg.cso.uiuc.edu
Wed Dec 21 07:24:00 AEST 1988
I want to write a subroutine in C, called S. I want S to be known outside.
I also want to have two subroutines X and Y to be known ONLY to S (not known
outside of S). Either can be called by S, and each calls the other in a
recursive way. I also need to share several variables entirely within
this context (shared between S, X, Y). They can be static. There will
only be 1 instance of S (and therefore also of X and Y, but that should
be hidden). Main program M should be able to call S, but any references
to X and Y will not be resolved by the module S.
How do I lay out the arrangement of source for S? An example would be
appreciated. Thanks.
--Phil--
More information about the Comp.lang.c
mailing list