Is this a qualifier or something else?

D

D.Hering

When I see something like this prototype:

SOMETHING int func( int x );

what is SOMETHING doing there?

thanks very much,
-Dieter
 
U

user923005

When I see something like this prototype:

SOMETHING int func( int x );

what is SOMETHING doing there?

That depends on what SOMETHING says.
Probably, it is storage class in most cases like
extern int func( int x );
OR
static int func( int x );
but if you don't show us what SOMETHING is then we can only guess
 
Z

Zero

Sometimes,

SOMETHING is used as a define

like

#define COMP_LOCAL
#define COMP_GLOBAL

Then, the code is more readable,
because the programmer wants to say that the function is known only in
the modul
or it is know in the whole project.

Zeh Mau
 
D

D.Hering

Sometimes,

SOMETHING is used as a define

like

That depends on what SOMETHING says.
Probably, it is storage class in most cases like
extern int func( int x );
OR
static int func( int x );
but if you don't show us what SOMETHING is then we can only guess

#define COMP_LOCAL
#define COMP_GLOBAL

Then, the code is more readable,
because the programmer wants to say that the function is known only in
the modul
or it is know in the whole project.

Zeh Mau

Yeah, in this particular case, it turned out to be a macro definition
that expands out to an export/import mechanism needed for a crappy,
market dominant, operating system which I shall leave
nameless ;) ;) ;)

Thanks for the inputs, I greatly appreciate it,
-Dieter
 
M

Mike Wahler

D.Hering said:
When I see something like this prototype:

SOMETHING int func( int x );

what is SOMETHING doing there?

thanks very much,

It's most likely some platform-specific mechanism.
Whenever you see something like that, search any
headers which are #included (either directly or
indirectly), and you'll very likely find a macro
which #defines the meaning. (Also, such a macro
might be simply giving another name to a valid
keyword, such as 'extern' or 'static').
Check your headers.

-Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top