Mail Archives: djgpp/1997/04/27/05:38:18
Ruiter de M (mdruiter AT cs DOT vu DOT nl) wrote:
: Ian Mausolus (mausolus AT ican DOT net) wrote:
: : What is the significance of the word "static" in front of a function name
: : in C?
[ snip ]
: That means, that the function is declared local to the file. No other file
: can use it (by means of a .h-file).
[ snip again]
Nonsense.
Linux 2.0.27.
ge:~$
ge:~$ cat head.h
static void foo ( int *i )
{
*i=12345;
}
ge:~$
ge:~$ cat myprog.c
#include "head.h"
#include <stdio.h>
void main()
{
int j;
foo(&j);
printf ("foo is %d \n",j);
}
ge:~$
ge:~$ gcc myprog.c
ge:~$ a.out
foo is 12345
ge:~$
- Raw text -