Liste des Groupes | Revenir à cl misc |
On 18/08/2024 15:55, David Brown wrote:I didn't mean we should go into detail about such features - it's just an example of a feature of the core language of C that most C programmers don't know about, and the lack of that knowledge does not prevent them being able to write code in C. It is not a useful feature.
...
What does "static" mean inside square brackets in a C function prototype?I know there's a better newsgroup for it but, since you brought it up and it does also fit here, I should say that I had no idea that a C program could have square brackets in a function prototype and I cannot think of ever seeing such a thing.
I presume you do mean C and not some sort of compiler extension.Yes.
As for static, IIRC labelling as "static" any external name (i.e. one not in a function) would make it private to the CU and not visible outside but that is just a guess.It is also used for local variables in functions - these then have the same scope as another local variable in the same place, but have program-static lifetime.
Or perhaps you meant a static formal parameter. Again, not something I've ever come across and would be curious as to what it meant.
Would you care to say more about what you had in mind?
Les messages affichés proviennent d'usenet.