Subroutine layout in C

Michael Burgett burgett at adobe.com
Thu Dec 22 02:48:23 AEST 1988


In article <2800002 at uxg.cso.uiuc.edu> phil at uxg.cso.uiuc.edu writes:
[ description of needed module deleted ]
>How do I lay out the arrangement of source for S?  An example would be
>appreciated.  Thanks.

in a file, say S.c:

static int foo, bar;	/* foo and bar are accessable by all functions
			   in this file but are not visible outside it. */

int S()			/* S() will be available as a public symbol */
{
  ...
}

static int f1()		/* can be referenced by S() or f2() but is not
{			   visible outside this file			*/
  ...
}

static int f2()		/* can be referenced by S() or f1() but is not
{			   visible outside this file			*/
  ...
}


should do what you are asking for...
		----------------------------------
			mike burgett
		     burgett at adobe.com
	   "squid and red bean stew served daily...."



More information about the Comp.lang.c mailing list