473,508 Members | 2,384 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Re: (part 7) Han from China answers your C questions

this poster tends to post with low information content
but high abuse content.
On Nov 2, 6:30*am, Nomen Nescio <nob...@dizum.comwrote:
lancer6...@yahoo.com said:
<snip>
[i] saw a function header defined as:
int Function(int value1, int value2, (int *A)(void *A1, int *A2, void
*A3), void *A3)
This specifies that parameter A is a pointer to a function
and the function is called by
Function(value1, value2, A, A3);
'A' would be the name of a function. C automatically converts the name
into
a pointer to a function. The term used in the standard is "decays to
a
function pointer"
Is the "(int *A)(void *A1, int *A2, void *A3)" in the function header
equivalent to passing a function (A) to another function (Function)?
it specifies that the parameter is a function pointer
Practically speaking, yes. In CLC-talk, no. Numerous semanticists,
postmodernists,
<snip>

your word salad seems more PoM than anything else I've
seen recently on clc.

Something to think about: If "(int *A)(void *A1, int *A2, void *A3)"
were replaced by "int A[]", would an entire array be passed to
Function() or something else?
If so, how are the arguments to A passed into Function when Function
is called?

They're not, at least not in the sense you probably think.
ok. It is specified that the parameter is a pointer to a function.
The parameters aren't passed here. You needd to look at the call
to A that, presumably, appears in Function().

<snip nonsense>
--
Nick Keighley
Nov 2 '08 #1
1 1202
On Sun, 2 Nov 2008 06:15:20 -0800 (PST), Nick Keighley
<ni******************@hotmail.comwrote:
>this poster tends to post with low information content
but high abuse content.
On Nov 2, 6:30*am, Nomen Nescio <nob...@dizum.comwrote:
>lancer6...@yahoo.com said:

<snip>
[i] saw a function header defined as:
int Function(int value1, int value2, (int *A)(void *A1, int *A2, void
*A3), void *A3)

This specifies that parameter A is a pointer to a function
and the function is called by
Function(value1, value2, A, A3);

'A' would be the name of a function. C automatically converts the name
into
a pointer to a function. The term used in the standard is "decays to
a
function pointer"
Actually the word decay does not appear in the standard at all.
6.3.2.1-4 says "A function designator is an expression that has
function type. Except when it is the operand of the sizeof operator or
the unary & operator, a function designator with type ‘‘function
returning type’’ is converted to an expression that has type ‘‘pointer
to function returning type’’.
--
Remove del for email
Nov 2 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1932
by: Nomen Nescio | last post by:
A new learner's question Flash Gordon wrote: To the OP, please be aware that Flash Gordon has a history of either deliberately misleading and "miss-informing" posters to this newsgroup or...
0
1463
by: Nomen Nescio | last post by:
what is the type for this call? Neo said: Neo, buddy, I've decided to give you a little summary for reference so that you don't have to sift through excess verbiage, cryptic meanderings,...
0
1278
by: Nomen Nescio | last post by:
No format string passed to variable argument list function Adam said: Then Adam laters says: Then Adam later says:
2
1483
by: Chris Dollin | last post by:
Joachim Schmitz wrote: I think that remark is an ill-considered and unhelpful generalisation. -- "We dance, and the worlds melt away." - Curved Air, /Metamorphosis/ ...
2
1510
by: Borked Pseudo Mailed | last post by:
float and integers c.lang.myself@gmail.com said I will be making assumptions here about your system that will infuriate the pedants, but I don't care. Given your X-HTTP-UserAgent string, it...
1
1463
by: George Orwell | last post by:
its urgent.pls help me. mona said: mona said: Hey again, mona. Please check the thread "(part 21) Han from China answers your C questions", in which I gave you a program with
0
1356
by: George Orwell | last post by:
fread breaks file descriptors opened in "w" mode. ... Yes, once you break out of ANSI/ISO C, all things are possible. You have posted an on-topic question to comp.lang.c. See version 2.0 of...
16
1779
by: Borked Pseudo Mailed | last post by:
Error handling in C Nick Keighley said: ... ... To the OP, please be aware that Nick Keighley is a known troll and is deliberately providing you with unsound advice. You asked for error...
2
2183
by: Nomen Nescio | last post by:
What is this? Eric said: That looks like either someone's poor coding or someone's poor pasting for an implementation of offsetof() from stddef.h. The (char *) leads me to think that there's...
1
1576
by: George Orwell | last post by:
File Seeking / Overwriting bytes Martien Verbruggen said: And this is, of course, also not right. fseek() does support SEEK_END on text streams. If you want to know why, please start a...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7115
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7321
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7377
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1547
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
414
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.