{"id":24,"date":"2010-06-09T08:50:41","date_gmt":"2010-06-09T08:50:41","guid":{"rendered":"http:\/\/www.electronic-products-development.com\/?p=24"},"modified":"2026-06-17T09:25:03","modified_gmt":"2026-06-17T08:25:03","slug":"pointer-to-a-function","status":"publish","type":"post","link":"https:\/\/ibex.tech\/c\/c\/pointers\/pointer-to-a-function","title":{"rendered":"Pointer To A Function"},"content":{"rendered":"<h5>The function:<\/h5>\n<pre><code>\tWORD my_function_name (BYTE a, WORD b);<\/code><\/pre>\n<h5>Declaring a pointer to a function:<\/h5>\n<pre><code>\tWORD (*p_function)(BYTE a, WORD b);<\/code><\/pre>\n<h5>Loading it:<\/h5>\n<pre><code>\tp_function = &my_function_name;<\/code><\/pre>\n<h5>Calling it:<\/h5>\n<pre><code>\tbtemp = my_function_name(1, 2);<\/code><\/pre>\n<p>or<\/p>\n<pre><code>\tbtemp = (*my_function_name)(1, 2);<\/code><\/pre>\n<h5>If your function returns a pointer of some sort then thts fine, just add the extra asterix:<\/h5>\n<pre><code>\r\n\tWORD *my_function_name (BYTE a, WORD b);\r\n\tWORD *(*p_function)(BYTE a, WORD b);\r\n\tp_word = my_function_name(1, 2);\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The function: WORD my_function_name (BYTE a, WORD b); Declaring a pointer to a function: WORD (*p_function)(BYTE a, WORD b); Loading it: p_function = &#038;my_function_name; Calling it: btemp = my_function_name(1, 2); or btemp = (*my_function_name)(1, 2); If your function returns a pointer of some sort then thts fine, just add the extra asterix: WORD *my_function_name (BYTE [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-24","post","type-post","status-publish","format-standard","hentry","category-pointers"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts\/24","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/comments?post=24"}],"version-history":[{"count":2,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts\/24\/revisions"}],"predecessor-version":[{"id":567,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts\/24\/revisions\/567"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/media?parent=24"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/categories?post=24"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/tags?post=24"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}