<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Declare and dereference pointer of unknown type</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/42485572a9/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/42485572a9/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/42485572a9/</id><updated>2020-02-27T13:53:20.185000Z</updated><subtitle>Recent posts to Declare and dereference pointer of unknown type</subtitle><entry><title>Declare and dereference pointer of unknown type</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/42485572a9/?limit=25#4411" rel="alternate"/><published>2020-02-27T13:53:20.185000Z</published><updated>2020-02-27T13:53:20.185000Z</updated><author><name>rickj</name><uri>https://forge.codesys.com/u/rickj/</uri></author><id>https://forge.codesys.com02155a3b2b6dcfe061dc01708798cea0aedf9c0c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Create a union of the various pointer types instead of a structure.  You may also want to consider using  REFERENCE instead of POINTER; it may or may not be easier to use dending on your specific usage.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Declare and dereference pointer of unknown type</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/42485572a9/?limit=25#d651" rel="alternate"/><published>2020-02-27T13:53:19.656000Z</published><updated>2020-02-27T13:53:19.656000Z</updated><author><name>Kim</name><uri>https://forge.codesys.com/u/kim/</uri></author><id>https://forge.codesys.combb401121a093f1a22e3992e976378dabee3c848b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I'm making a trace function block meant to be used with our HMI.&lt;br/&gt;
Amongst other things, I need to pass a trigger variable and what to trace.&lt;br/&gt;
The problem is that these variables could be of any base type, unknown to me at design time.&lt;/p&gt;
&lt;p&gt;From my understanding, I can only declare a pointer to a specific base type.&lt;br/&gt;
I could ofc make a struct with one pointer of each base type and then have another variable stating what type is used, but surely there must be a better way of doing this?&lt;/p&gt;
&lt;p&gt;How can I solve this in a nice way?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>