No we're only speaking of sources in the same project. Conflicts could occur
at compile or link time.
This can happen if you link with libraries (your own or third-parties's).
Say you build (or use) a library in which there is a method called "Test",
that is not part of the API for that library (not present in the .h files).
Now in a project, you have a .c file which also has a "Test" method, which
of course is not the same as the library one. The linker will fail with a
name conflict, unless you declare the method "static" in the library .c
file, or the project .c file, or both.
Declaring a method "static" stops files other than the one containing the
method from "seeing" that method.
Note that "static" has a different meaning in C++ when used for member
methods or fields.
Eric
> De�: "Gaurav Palvia" <[EMAIL PROTECTED]>
> R�pondre �: [EMAIL PROTECTED]
> Date�: Fri, 7 Jan 2000 21:34:00 +0530
> ��: <[EMAIL PROTECTED]>
> Objet�: Re: why we use static before a function what is the significanceof it
>
> what exactly meant by the same source.does it mean that if there r
> two different apps on Palm which has two different functions of the same
> name then it will cauuse conflict.if yes then how does it happen
> -----Original Message-----
> From: Eric VERGNAUD <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> Date: Friday, January 07, 2000 7:02 PM
> Subject: Re: why we use static before a function what is the significanceof
> it
>
>
>> Yes, it avoids possible name conflicts betwwen sources.
>>
>>> De : "Ramel Levin" <[EMAIL PROTECTED]>
>>> R�pondre � : [EMAIL PROTECTED]
>>> Date : Fri, 7 Jan 2000 12:40:54 +0200
>>> � : <[EMAIL PROTECTED]>
>>> Objet : Re: why we use static before a function what is the significance
> of it
>>>
>>> It means that this function can only be accesses from the same source....
>>> this is good programming behavior so you functions are kept "private"
> from
>>> other sources.
>>>
>>> R.
>>>
>>> ----- Original Message -----
>>> From: Gaurav Palvia <[EMAIL PROTECTED]>
>>> To: palm-dev-forum <[EMAIL PROTECTED]>
>>> Sent: Friday, January 07, 2000 12:36 PM
>>> Subject: why we use static before a function what is the significance of
> it
>>>
>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>
>