By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,919 Members | 1,047 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,919 IT Pros & Developers. It's quick & easy.

Is this a qualifier or something else?

P: n/a
When I see something like this prototype:

SOMETHING int func( int x );

what is SOMETHING doing there?

thanks very much,
-Dieter

Apr 7 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Apr 6, 11:11 pm, "D.Hering" <vel.ac...@gmail.comwrote:
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
Apr 7 '07 #2

P: n/a
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

Apr 7 '07 #3

P: n/a
On Apr 7, 4:25 am, "Zero" <chefmue...@web.dewrote:
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

Apr 7 '07 #4

P: n/a

"D.Hering" <ve*******@gmail.comwrote in message
news:11**********************@y80g2000hsf.googlegr oups.com...
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
Apr 7 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.