Xref: utzoo comp.lang.c:11677 comp.sys.ibm.pc:17736 Path: utzoo!utgpu!attcan!uunet!portal!cup.portal.com!Howard_Reed_Johnson From: Howard_Reed_Johnson@cup.portal.com Newsgroups: comp.lang.c,comp.sys.ibm.pc Subject: Re: static -> static near Message-ID: <7836@cup.portal.com> Date: 3 Aug 88 05:54:47 GMT References: <799@tiger.oxy.edu> <12760@mimsy.UUCP> Organization: The Portal System (TM) Lines: 17 XPortal-User-Id: 1.1001.3570 Someone asked a question about the difference between the 'static' keyword and the 'near' keyword used in 80x86 compilers, viz.: What's the difference between these declarations? static int func() { return(0); } static near int func() { return(0); } Using static in this context (outside a function) simply means that the symbol referred to is not visible outside that source file. The near qualifier instructs the 80x86 compiler to expect to be called with a near call (as opposed to a far call). The two are not equivalent, since the address of 'func' can be given to other program modules via a pointer to function: int (*pfi)() = func;