Differences between version 6 and revision by previous author of CastingPointerToFunction.
Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History
Newer page: | version 6 | Last edited on Wednesday, July 16, 2003 2:17:23 pm | by JosephPawletko | Revert |
Older page: | version 5 | Last edited on Wednesday, January 22, 2003 4:22:37 pm | by JohnMcPherson | Revert |
@@ -25,9 +25,9 @@
And you need to do this why?
* Jon was using it to "compile" something then jump to it in C, by casting an array as a function, then calling it.
-* I use it frequently to do things like have a lookup table of name to function. For example in ircu, theres
a functino
called "parse" which takes a line from a user, splits it up into a function and it's arguments, then scans through a table of functions and their names, when it finds one that matches that command, it calls the function with the arguments it parsed earlier. Nice 'n zippy.
+* I use it frequently to do things like have a lookup table of name to function. For example in ircu, there is
a function
called "parse" which takes a line from a user, splits it up into a function and it's arguments, then scans through a table of functions and their names, when it finds one that matches that command, it calls the function with the arguments it parsed earlier. Nice 'n zippy.
* Some functions take another function as an argument. See the example below.