* Re: default function parameters
2005-09-09 18:43 default function parameters _z33
@ 2005-09-09 6:47 ` Steve Graegert
2005-09-09 19:38 ` _z33
2005-09-09 12:43 ` Glynn Clements
1 sibling, 1 reply; 16+ messages in thread
From: Steve Graegert @ 2005-09-09 6:47 UTC (permalink / raw)
To: _z33; +Cc: linux-c-programming
On 9/9/05, _z33 <timid.Gentoo@gmail.com> wrote:
> I had a wierd doubt today morning. If a function's return type is not
> defined, "C" takes it as returning "int". Now, what does it do when I
> don't specify the arguments of the function. Something like this -
>
> void sampleFunc ()
> {
> /* ... */
> }
>
> Is this equivalent to saying,
>
> void sampleFunc (void)
> {
> /* ... */
> }
Yes, technically both are equivalent. The latter is the new style
while the former is the "old" style. But be aware: A function defined
using the old style does __not__ establish a prototype, but if a
previously declared prototype for that function exists, the parameter
declarations in the definition must exactly match those in the
prototype after the default argument promotions are applied to the
parameters in the definition.
Conclusion: avoid mixing old style and prototype style
declarations/definition for a given function. It is allowed but not
recommended.
Regards
\Steve
--
Steve Graegert <graegerts@gmail.com>
Software Consultancy {C/C++ && Java && .NET}
Mobile: +49 (176) 21248869
Office: +49 (9131) 7126409
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: default function parameters
2005-09-09 19:38 ` _z33
@ 2005-09-09 7:36 ` Steve Graegert
2005-09-09 8:46 ` _z33
2005-09-09 12:50 ` Glynn Clements
1 sibling, 1 reply; 16+ messages in thread
From: Steve Graegert @ 2005-09-09 7:36 UTC (permalink / raw)
To: _z33; +Cc: linux-c-programming
On 9/9/05, _z33 <timid.Gentoo@gmail.com> wrote:
> Steve Graegert wrote:
> > On 9/9/05, _z33 <timid.Gentoo@gmail.com> wrote:
> >
> >> I had a wierd doubt today morning. If a function's return type is not
> >>defined, "C" takes it as returning "int". Now, what does it do when I
> >>don't specify the arguments of the function. Something like this -
> >>
> >> void sampleFunc ()
> >> {
> >> /* ... */
> >> }
> >>
> >> Is this equivalent to saying,
> >>
> >> void sampleFunc (void)
> >> {
> >> /* ... */
> >> }
> >
> >
> > Yes, technically both are equivalent. The latter is the new style
> > while the former is the "old" style. But be aware: A function defined
> > using the old style does __not__ establish a prototype, but if a
> > previously declared prototype for that function exists, the parameter
> > declarations in the definition must exactly match those in the
> > prototype after the default argument promotions are applied to the
> > parameters in the definition.
> >
> > Conclusion: avoid mixing old style and prototype style
> > declarations/definition for a given function. It is allowed but not
> > recommended.
>
> I'm clear... but, now wondering why for two days a guy from an R&D
> dept of an MNC is arguing with me, saying that a function with empty
> argument specification implies having implicit "int" type arguments.
> (similar to the implicit assumption of return type of functions to "int"
> when none is specified explicitly).
Unless you're writing a compiler this does not matter. Even if an int
argument in implicitly used it has no meaning to the programmer.
Since void is a well defined type, although an incomplete one, I have
doubts that int is used internally. I simply can't see the rationale
behind that (but I'd be happy to be enlightened). Could you please
try to transport your collegue's argumentation?
Regards
\Steve
--
Steve Graegert <graegerts@gmail.com>
Software Consultancy {C/C++ && Java && .NET}
Mobile: +49 (176) 21248869
Office: +49 (9131) 7126409
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: default function parameters
2005-09-09 7:36 ` Steve Graegert
@ 2005-09-09 8:46 ` _z33
2005-09-09 9:23 ` Jarmo
` (2 more replies)
0 siblings, 3 replies; 16+ messages in thread
From: _z33 @ 2005-09-09 8:46 UTC (permalink / raw)
To: linux-c-programming
Steve Graegert wrote:
> Unless you're writing a compiler this does not matter. Even if an int
> argument in implicitly used it has no meaning to the programmer.
> Since void is a well defined type, although an incomplete one, I have
> doubts that int is used internally. I simply can't see the rationale
> behind that (but I'd be happy to be enlightened). Could you please
> try to transport your collegue's argumentation?
Here is what he sent me -
#include <stdio.h>
void add ()
{
printf ("inside function: add. \n");
return;
}
int main (void)
{
/* call function add with some parameters */
add (5, 1);
system ("PAUSE");
return (0);
}
How can this work, if not specifying any argument, is equivalent to
specifying as void?
However, one thing I was able observe was that it accepts any kind of
arguments, and also any number of arguments, as against his theory of
only accepting "int" types.
I even tried compiling with "-Wall" option to see if any warnings are
being thrown by the compiler, but found to my disappointment that there
was none.
Am I fundamentally going wrong in my understanding of functions?
_z33
--
I love TUX; well... that's an understatement :)
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: default function parameters
2005-09-09 8:46 ` _z33
@ 2005-09-09 9:23 ` Jarmo
2005-09-09 9:42 ` Steve Graegert
2005-09-09 9:50 ` _z33
2005-09-09 9:34 ` Steve Graegert
2005-09-09 13:00 ` Glynn Clements
2 siblings, 2 replies; 16+ messages in thread
From: Jarmo @ 2005-09-09 9:23 UTC (permalink / raw)
To: linux-c-programming
There is a diff in how C and C++ sees this.
For C add( ) is an function taking undefined argument(s), so you can
send it whatever you want. C++ on other hand will see add( ) as add(
void ), and would complain. To say that add( ) would be equal to add(
int(s) ) is bogus thou.
In real life this does not matter. This is a completely academic
question. Thou *I think* even the C compiler should have given a
warning. (Note -Wall does not turn on all warnings, just almost all).
// Jarmo
--
>> Unless you're writing a compiler this does not matter. Even if an int
>> argument in implicitly used it has no meaning to the programmer. Since
>> void is a well defined type, although an incomplete one, I have
>> doubts that int is used internally. I simply can't see the rationale
>> behind that (but I'd be happy to be enlightened). Could you please
>> try to transport your collegue's argumentation?
>
> Here is what he sent me -
>
> #include <stdio.h>
>
> void add ()
> {
> printf ("inside function: add. \n");
>
> return;
> }
>
> int main (void)
> {
> /* call function add with some parameters */
> add (5, 1);
>
> system ("PAUSE");
>
> return (0);
> }
>
> How can this work, if not specifying any argument, is equivalent to
> specifying as void?
> However, one thing I was able observe was that it accepts any kind of
> arguments, and also any number of arguments, as against his theory of
> only accepting "int" types.
> I even tried compiling with "-Wall" option to see if any warnings are
> being thrown by the compiler, but found to my disappointment that there
> was none.
> Am I fundamentally going wrong in my understanding of functions?
>
> _z33
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: default function parameters
2005-09-09 8:46 ` _z33
2005-09-09 9:23 ` Jarmo
@ 2005-09-09 9:34 ` Steve Graegert
2005-09-09 9:44 ` _z33
2005-09-09 13:00 ` Glynn Clements
2 siblings, 1 reply; 16+ messages in thread
From: Steve Graegert @ 2005-09-09 9:34 UTC (permalink / raw)
To: _z33; +Cc: linux-c-programming
On 9/9/05, _z33 <timid.Gentoo@gmail.com> wrote:
> Steve Graegert wrote:
>
> > Unless you're writing a compiler this does not matter. Even if an int
> > argument in implicitly used it has no meaning to the programmer.
> > Since void is a well defined type, although an incomplete one, I have
> > doubts that int is used internally. I simply can't see the rationale
> > behind that (but I'd be happy to be enlightened). Could you please
> > try to transport your collegue's argumentation?
>
> Here is what he sent me -
>
> #include <stdio.h>
>
> void add ()
> {
> printf ("inside function: add. \n");
>
> return;
> }
>
> int main (void)
> {
> /* call function add with some parameters */
> add (5, 1);
>
> system ("PAUSE");
>
> return (0);
> }
add is defined as a function that can take an arbitrary number of
arguments, since no args are defined (not even void).
OK, so what happens here? Calling add with an arbitrary number of
arguments is fairly legal, but since no prototype is declared and no
arguments are defined for add, the arguments are discarded (i.e.
nothing is pushed on the stack).
I have modified the code to clarify my thoughts:
#include <stdio.h>
/* prototype */
void add(); /* call with arbitrary number of arguments */
void add (int a, int b, int c) {
printf ("inside function: add(%d, %d)\n", a, b);
return;
}
int main (void) {
/* call function add with some parameters */
add(5, 1);
getc(stdin);
return (0);
}
Do you see the difference? No warning is issued, because there is
nothing wrong with it (it is not recommended by ANSI C99 but still
valid).
> How can this work, if not specifying any argument, is equivalent to
> specifying as void?
What we see here is the "old" style of using some kind of variadic
functions. Specifying void here indicates we do not intend to use the
old style, but ANSI C instead. The compiler is smart enough and does
not issue a warning.
> However, one thing I was able observe was that it accepts any kind of
> arguments, and also any number of arguments, as against his theory of
> only accepting "int" types.
As stated above: this is the old pre-ANSI C style and legal. When no
args are specified or void is given, nothing is pushed on the stack
and no register hold arguments.
> I even tried compiling with "-Wall" option to see if any warnings are
> being thrown by the compiler, but found to my disappointment that there
> was none.
Because there is nothing wrong with it.
> Am I fundamentally going wrong in my understanding of functions?
No you're not. You're just curious :-)
Regards
\Steve
--
Steve Graegert <graegerts@gmail.com>
Software Consultancy {C/C++ && Java && .NET}
Mobile: +49 (176) 21248869
Office: +49 (9131) 7126409
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: default function parameters
2005-09-09 9:23 ` Jarmo
@ 2005-09-09 9:42 ` Steve Graegert
2005-09-09 9:58 ` _z33
2005-09-09 9:50 ` _z33
1 sibling, 1 reply; 16+ messages in thread
From: Steve Graegert @ 2005-09-09 9:42 UTC (permalink / raw)
To: Jarmo; +Cc: linux-c-programming
On 9/9/05, Jarmo <SVisor@lycos.com> wrote:
> There is a diff in how C and C++ sees this.
>
> For C add( ) is an function taking undefined argument(s), so you can
> send it whatever you want. C++ on other hand will see add( ) as add(
> void ), and would complain. To say that add( ) would be equal to add(
> int(s) ) is bogus thou.
Exactly. A point I have missed to mention. Thanks.
> Thou *I think* even the C compiler should have given a
> warning. (Note -Wall does not turn on all warnings, just almost all).
try -ansi combined with -pedantic.
> >> Unless you're writing a compiler this does not matter. Even if an int
> >> argument in implicitly used it has no meaning to the programmer. Since
> >> void is a well defined type, although an incomplete one, I have
> >> doubts that int is used internally. I simply can't see the rationale
> >> behind that (but I'd be happy to be enlightened). Could you please
> >> try to transport your collegue's argumentation?
> >
> > Here is what he sent me -
> >
> > #include <stdio.h>
> >
> > void add ()
> > {
> > printf ("inside function: add. \n");
> >
> > return;
> > }
> >
> > int main (void)
> > {
> > /* call function add with some parameters */
> > add (5, 1);
> >
> > system ("PAUSE");
> >
> > return (0);
> > }
> >
> > How can this work, if not specifying any argument, is equivalent to
> > specifying as void?
> > However, one thing I was able observe was that it accepts any kind of
> > arguments, and also any number of arguments, as against his theory of
> > only accepting "int" types.
> > I even tried compiling with "-Wall" option to see if any warnings are
> > being thrown by the compiler, but found to my disappointment that there
> > was none.
> > Am I fundamentally going wrong in my understanding of functions?
> >
> > _z33
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: default function parameters
2005-09-09 9:34 ` Steve Graegert
@ 2005-09-09 9:44 ` _z33
2005-09-09 10:20 ` Steve Graegert
0 siblings, 1 reply; 16+ messages in thread
From: _z33 @ 2005-09-09 9:44 UTC (permalink / raw)
To: linux-c-programming
Steve Graegert wrote:
> I have modified the code to clarify my thoughts:
>
> #include <stdio.h>
>
> /* prototype */
> void add(); /* call with arbitrary number of arguments */
>
> void add (int a, int b, int c) {
> printf ("inside function: add(%d, %d)\n", a, b);
> return;
> }
>
> int main (void) {
> /* call function add with some parameters */
> add(5, 1);
> getc(stdin);
>
> return (0);
> }
>
> Do you see the difference? No warning is issued, because there is
> nothing wrong with it (it is not recommended by ANSI C99 but still
> valid).
>
Inside "main", did you mean to write the function call as " add (5,
1, <some number>); ". Cos' when I copy the code, and try to run it, it
throws me this error message during compilation.
- too few arguments to function `add'-
>> Am I fundamentally going wrong in my understanding of functions?
>
>
> No you're not. You're just curious :-)
Thanks!
_z33
--
I love TUX; well... that's an understatement :)
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: default function parameters
2005-09-09 9:23 ` Jarmo
2005-09-09 9:42 ` Steve Graegert
@ 2005-09-09 9:50 ` _z33
1 sibling, 0 replies; 16+ messages in thread
From: _z33 @ 2005-09-09 9:50 UTC (permalink / raw)
To: linux-c-programming
Jarmo wrote:
> To say that add( ) would be equal to add(
> int(s) ) is bogus thou.
Now its crystal clear.
_z33
--
I love TUX; well... that's an understatement :)
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: default function parameters
2005-09-09 9:42 ` Steve Graegert
@ 2005-09-09 9:58 ` _z33
0 siblings, 0 replies; 16+ messages in thread
From: _z33 @ 2005-09-09 9:58 UTC (permalink / raw)
To: linux-c-programming
Steve Graegert wrote:
>>Thou *I think* even the C compiler should have given a
>>warning. (Note -Wall does not turn on all warnings, just almost all).
>
>
> try -ansi combined with -pedantic.
>
>
I'm using "bloodshed developer cpp" compiler (it uses Mingw port of
GCC as it's compiler)in windows for the while.
When I specify these options to the compiler, it still seems to
compile quietly without a squeak!
_z33
--
I love TUX; well... that's an understatement :)
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: default function parameters
2005-09-09 9:44 ` _z33
@ 2005-09-09 10:20 ` Steve Graegert
0 siblings, 0 replies; 16+ messages in thread
From: Steve Graegert @ 2005-09-09 10:20 UTC (permalink / raw)
To: _z33; +Cc: linux-c-programming
On 9/9/05, _z33 <timid.Gentoo@gmail.com> wrote:
> Steve Graegert wrote:
> > I have modified the code to clarify my thoughts:
> >
> > #include <stdio.h>
> >
> > /* prototype */
> > void add(); /* call with arbitrary number of arguments */
> >
> > void add (int a, int b, int c) {
> > printf ("inside function: add(%d, %d)\n", a, b);
> > return;
> > }
> >
> > int main (void) {
> > /* call function add with some parameters */
> > add(5, 1);
> > getc(stdin);
> >
> > return (0);
> > }
> >
> > Do you see the difference? No warning is issued, because there is
> > nothing wrong with it (it is not recommended by ANSI C99 but still
> > valid).
> >
>
> Inside "main", did you mean to write the function call as " add (5,
> 1, <some number>); ". Cos' when I copy the code, and try to run it, it
> throws me this error message during compilation.
> - too few arguments to function `add'-
No, the code given is exactly what I wanted to show. (The code you
provided was Windows code and I tested it under Windows without
complaints.)
Unfortunately, under Linux you cannot switch to "traditional" since it
would clash with libc which is an ISO C library. Under Solaris
(SPARCWorx) you may want to try -traditional and -fd. As far as I
know only SunOS and HP-UX (besides Windows) come with a native K&R C
compiler. All others do prototype checking.
> >> Am I fundamentally going wrong in my understanding of functions?
> >
> >
> > No you're not. You're just curious :-)
>
> Thanks!
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: default function parameters
2005-09-09 18:43 default function parameters _z33
2005-09-09 6:47 ` Steve Graegert
@ 2005-09-09 12:43 ` Glynn Clements
2005-09-10 5:00 ` _z33
1 sibling, 1 reply; 16+ messages in thread
From: Glynn Clements @ 2005-09-09 12:43 UTC (permalink / raw)
To: _z33; +Cc: linux-c-programming
_z33 wrote:
> I had a wierd doubt today morning. If a function's return type is not
> defined, "C" takes it as returning "int". Now, what does it do when I
> don't specify the arguments of the function. Something like this -
>
> void sampleFunc ()
> {
> /* ... */
> }
>
> Is this equivalent to saying,
>
> void sampleFunc (void)
> {
> /* ... */
> }
The former declares a function taking unspecified arguments, while the
latter declares a function taking no arguments.
You can pass arguments to the former (although it can't use them), but
you will get an error if you try to pass arguments to the latter.
Nowadays, the main use of the former is for declaring a variable or
field which can hold a pointer to arbitrary functions, e.g.
int (*foo)();
declares a variable which can hold a pointer to any function which
returns int, regardless of its argument types.
--
Glynn Clements <glynn@gclements.plus.com>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: default function parameters
2005-09-09 19:38 ` _z33
2005-09-09 7:36 ` Steve Graegert
@ 2005-09-09 12:50 ` Glynn Clements
1 sibling, 0 replies; 16+ messages in thread
From: Glynn Clements @ 2005-09-09 12:50 UTC (permalink / raw)
To: _z33; +Cc: linux-c-programming
_z33 wrote:
> I'm clear... but, now wondering why for two days a guy from an R&D
> dept of an MNC is arguing with me, saying that a function with empty
> argument specification implies having implicit "int" type arguments.
> (similar to the implicit assumption of return type of functions to "int"
> when none is specified explicitly).
If you call a function for which a prototype is in scope, the
arguments will be coerced to the specified types. E.g. if you have:
void foo(float x) { ... }
...
foo(1.0);
k will be passed as a float (even though the literal has type double).
OTOH, if the function was declared without its argument list, the
arguments will be converted using the K&R default conversions, i.e.
char and short are converted to int, float is converted to double, and
other types are passed without conversions.
Similarly, if a function has a variadic protoype (e.g. the printf()
family), the variadic arguments (those accounted for by the ellipsis)
are subject to the default conversions.
--
Glynn Clements <glynn@gclements.plus.com>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: default function parameters
2005-09-09 8:46 ` _z33
2005-09-09 9:23 ` Jarmo
2005-09-09 9:34 ` Steve Graegert
@ 2005-09-09 13:00 ` Glynn Clements
2 siblings, 0 replies; 16+ messages in thread
From: Glynn Clements @ 2005-09-09 13:00 UTC (permalink / raw)
To: _z33; +Cc: linux-c-programming
_z33 wrote:
> > Unless you're writing a compiler this does not matter. Even if an int
> > argument in implicitly used it has no meaning to the programmer.
> > Since void is a well defined type, although an incomplete one, I have
> > doubts that int is used internally. I simply can't see the rationale
> > behind that (but I'd be happy to be enlightened). Could you please
> > try to transport your collegue's argumentation?
>
> Here is what he sent me -
>
> #include <stdio.h>
>
> void add ()
> {
> printf ("inside function: add. \n");
>
> return;
> }
>
> int main (void)
> {
> /* call function add with some parameters */
> add (5, 1);
>
> system ("PAUSE");
>
> return (0);
> }
>
> How can this work, if not specifying any argument, is equivalent to
> specifying as void?
It isn't.
> However, one thing I was able observe was that it accepts any kind of
> arguments, and also any number of arguments, as against his theory of
> only accepting "int" types.
> I even tried compiling with "-Wall" option to see if any warnings are
> being thrown by the compiler, but found to my disappointment that there
> was none.
> Am I fundamentally going wrong in my understanding of functions?
The original K&R C didn't have function prototypes.
When you call a function, the arguments are first subject to the
default conversions (i.e. arguments smaller than int, or
floating-point arguments smaller than double are expanded to a more
"normal" size).
Then, all of the arguments are pushed onto the stack in right-to-left
order (so the arguments, read left-to-right, are at increasing
locations in memory). The function is called by pushing the return
address onto the stack, then jumping to the function's start address,
usually with a "call" or "jsr" (jump-to-subroutine) instruction.
When the function returns, the stack pointer is returned to its
previous value, effectively removing the arguments from the stack.
From the perspective of the caller, it doesn't matter what arguments
the function is supposed to accept; it just passes whatever you give
it.
From the perspective of the function itself, the caller had better
have pushed all of the necessary arguments onto the stack, otherwise
the argument variables will end up containing whatever data happened
to be on the stack at that point. However, it won't matter if the
caller pushed extra arguments onto the stack.
ANSI C added function prototypes, which allows the compiler to check
that the correct number and types of arguments are passed (or
implicitly cast the arguments to the correct types). It also added the
ellipsis ("...") to bypass the type-checking in the case where a
function can take additional arguments whose number and types aren't
known at compile time.
--
Glynn Clements <glynn@gclements.plus.com>
^ permalink raw reply [flat|nested] 16+ messages in thread
* default function parameters
@ 2005-09-09 18:43 _z33
2005-09-09 6:47 ` Steve Graegert
2005-09-09 12:43 ` Glynn Clements
0 siblings, 2 replies; 16+ messages in thread
From: _z33 @ 2005-09-09 18:43 UTC (permalink / raw)
To: linux-c-programming
I had a wierd doubt today morning. If a function's return type is not
defined, "C" takes it as returning "int". Now, what does it do when I
don't specify the arguments of the function. Something like this -
void sampleFunc ()
{
/* ... */
}
Is this equivalent to saying,
void sampleFunc (void)
{
/* ... */
}
_z33
--
I love TUX; well... that's an understatement :)
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: default function parameters
2005-09-09 6:47 ` Steve Graegert
@ 2005-09-09 19:38 ` _z33
2005-09-09 7:36 ` Steve Graegert
2005-09-09 12:50 ` Glynn Clements
0 siblings, 2 replies; 16+ messages in thread
From: _z33 @ 2005-09-09 19:38 UTC (permalink / raw)
To: linux-c-programming
Steve Graegert wrote:
> On 9/9/05, _z33 <timid.Gentoo@gmail.com> wrote:
>
>> I had a wierd doubt today morning. If a function's return type is not
>>defined, "C" takes it as returning "int". Now, what does it do when I
>>don't specify the arguments of the function. Something like this -
>>
>> void sampleFunc ()
>> {
>> /* ... */
>> }
>>
>> Is this equivalent to saying,
>>
>> void sampleFunc (void)
>> {
>> /* ... */
>> }
>
>
> Yes, technically both are equivalent. The latter is the new style
> while the former is the "old" style. But be aware: A function defined
> using the old style does __not__ establish a prototype, but if a
> previously declared prototype for that function exists, the parameter
> declarations in the definition must exactly match those in the
> prototype after the default argument promotions are applied to the
> parameters in the definition.
>
> Conclusion: avoid mixing old style and prototype style
> declarations/definition for a given function. It is allowed but not
> recommended.
I'm clear... but, now wondering why for two days a guy from an R&D
dept of an MNC is arguing with me, saying that a function with empty
argument specification implies having implicit "int" type arguments.
(similar to the implicit assumption of return type of functions to "int"
when none is specified explicitly).
_z33
--
I love TUX; well... that's an understatement :)
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: default function parameters
2005-09-09 12:43 ` Glynn Clements
@ 2005-09-10 5:00 ` _z33
0 siblings, 0 replies; 16+ messages in thread
From: _z33 @ 2005-09-10 5:00 UTC (permalink / raw)
To: linux-c-programming
Glynn Clements wrote:
> Nowadays, the main use of the former is for declaring a variable or
> field which can hold a pointer to arbitrary functions, e.g.
>
> int (*foo)();
>
> declares a variable which can hold a pointer to any function which
> returns int, regardless of its argument types.
>
Thanks for the explanation. Its clear now.
_z33
--
I love TUX; well... that's an understatement :)
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2005-09-10 5:00 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-09 18:43 default function parameters _z33
2005-09-09 6:47 ` Steve Graegert
2005-09-09 19:38 ` _z33
2005-09-09 7:36 ` Steve Graegert
2005-09-09 8:46 ` _z33
2005-09-09 9:23 ` Jarmo
2005-09-09 9:42 ` Steve Graegert
2005-09-09 9:58 ` _z33
2005-09-09 9:50 ` _z33
2005-09-09 9:34 ` Steve Graegert
2005-09-09 9:44 ` _z33
2005-09-09 10:20 ` Steve Graegert
2005-09-09 13:00 ` Glynn Clements
2005-09-09 12:50 ` Glynn Clements
2005-09-09 12:43 ` Glynn Clements
2005-09-10 5:00 ` _z33
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).