T
Thomas L.
Hi all,
Does a "NULL constant function" exist in C? I mean:
I am searching for a C language constant which would be something like
a function but which would be translated by a compiler into "nothing":
no argument push in the stack pointer, no execution of the function
instructions, no cleaning up, nothing, nada, rien, vide...
I could then initialize a function pointer f to that constant function
and ask
(*f)(any_argument_list)
and the compiler would translate it and write in the text section:
*NOTHING*
I apologize if it seems "pathetically useless" but actually I would
find it the right tool to perform, for example,
(*MyVector->methods->NormalizeVector)(MyVector->info) if I know
MyVector is unit-length (so that it would not be modified by the
NormalizeVector function).
To perform the normalization is useless, time consuming and I am
exposed to rounding errors.
Any input appreciated
Thomas
Does a "NULL constant function" exist in C? I mean:
I am searching for a C language constant which would be something like
a function but which would be translated by a compiler into "nothing":
no argument push in the stack pointer, no execution of the function
instructions, no cleaning up, nothing, nada, rien, vide...
I could then initialize a function pointer f to that constant function
and ask
(*f)(any_argument_list)
and the compiler would translate it and write in the text section:
*NOTHING*
I apologize if it seems "pathetically useless" but actually I would
find it the right tool to perform, for example,
(*MyVector->methods->NormalizeVector)(MyVector->info) if I know
MyVector is unit-length (so that it would not be modified by the
NormalizeVector function).
To perform the normalization is useless, time consuming and I am
exposed to rounding errors.
Any input appreciated
Thomas