As I am sure most of us have at some time, I have ocasionally missed the () off the end when calling a function.
e.g myFunction; instead of myFunction();
When I do this the code compiles and runs ok.
My question is, what is the value I actually get back? It seems very consistent. Is it some reference to the function or memory address?
Just inquisitive really.
Cheers,
Dirk
Returns the address of the function.
Is it some reference to the function or memory address?
Yes, it is. Dust off your C book: the name of a function gives you the address of the function (with or without the & operator). It's the same as with the name of an array.
Strictly, it doesn't return anything at all - since no function is called.
As already noted, it is simply a constant expression whose value is the address of the function.