Liste des Groupes | Revenir à cl c |
Bart <bc@freeuk.com> writes:This is what I observed my compiler doing, because it displays the symbol table. It puts C into module-scope, so I can access it also from another function without another declaration (so non-conforming, but I'm long past caring).
...If I write thisA small correction: that declaration gives all three names the same
>
int *A, B[10], C(int);
>
My compiler tells me that:
>
A is a local variable with type 'ref i32' (expressed in other syntax)
B is a local variable with type '[10]i32'
C is a function with return type of 'i32', taking one unnamed
parameter of type 'i32'.
>
(Interestingly, it places C into module scope, so the same declaration can
also create names in different scopes!)
scope[1].
You are confusing scope with linkage.It's possible. So a function declaration inside a function gives the name external linkage (?). Which in this context means the function will be outside this one, but elsewhere in the module, rather than being imported from elsewhere module.
Les messages affichés proviennent d'usenet.