<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Pointers and memory locations</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/591973be37/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/591973be37/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/591973be37/</id><updated>2020-02-27T15:12:53.128000Z</updated><subtitle>Recent posts to Pointers and memory locations</subtitle><entry><title>Pointers and memory locations</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/591973be37/?limit=25#d498" rel="alternate"/><published>2020-02-27T15:12:53.128000Z</published><updated>2020-02-27T15:12:53.128000Z</updated><author><name>tsimpson</name><uri>https://forge.codesys.com/u/tsimpson/</uri></author><id>https://forge.codesys.comebea95e3b63baa6ccd635be0b31c6d173cdcc85f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thank you, I will check that!&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Pointers and memory locations</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/591973be37/?limit=25#f8be" rel="alternate"/><published>2020-02-27T15:12:51.293000Z</published><updated>2020-02-27T15:12:51.293000Z</updated><author><name>josepmariarams</name><uri>https://forge.codesys.com/u/josepmariarams/</uri></author><id>https://forge.codesys.com09e0bc3261c46aa039b21395bd280dd01b1b992b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;See attribute {attribute 'subsequent'}.&lt;/p&gt;
&lt;p&gt;I have not test it.&lt;/p&gt;
&lt;p&gt;Enviat des del meu Aquaris M5.5 usant Tapatalk&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Pointers and memory locations</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/591973be37/?limit=25#c0ac" rel="alternate"/><published>2020-02-27T15:12:50.620000Z</published><updated>2020-02-27T15:12:50.620000Z</updated><author><name>tsimpson</name><uri>https://forge.codesys.com/u/tsimpson/</uri></author><id>https://forge.codesys.com86f6d6af1ea9e230585b39744e30b5be358f36d9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Greetings,&lt;/p&gt;
&lt;p&gt;Please allow me to start by saying I am new to Codesys having specialized in Siemens S7 for many years. Because of this please forgive me if I ask a "stupid" question &lt;/p&gt;
&lt;p&gt;I know "pointers" are a touchy subject with some people. However they do have their place. I noticed something that was a bit disturbing when attempting to setup and use a pointer. I setup variables in a "global" variable table. It was something like the following:&lt;/p&gt;
&lt;p&gt;ABC : WORD;&lt;br/&gt;
XYZ : ARRAY &lt;span&gt;[1..20]&lt;/span&gt; OF WORD;&lt;/p&gt;
&lt;p&gt;I setup the pointer to begin at "ABC" and transfer values from there to the end of "XYZ". The result I saw was that "ABC" was being filled with "value" but not "XYZ". I then used ADR() to find out what was going on. This revealed that in memory "ABC" was not contiguous in memory with "XYZ".&lt;/p&gt;
&lt;p&gt;My question is, is there some way (other than declaring a DUT (UDT) or ARRAY) that memory locations in a function or function block can be forced into memory in the order that they are declared?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>