<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Are Interfaces Pointers/References?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/91abe5ea89/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/91abe5ea89/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/91abe5ea89/</id><updated>2020-02-27T13:49:03.565000Z</updated><subtitle>Recent posts to Are Interfaces Pointers/References?</subtitle><entry><title>Are Interfaces Pointers/References?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/91abe5ea89/?limit=25#e10c" rel="alternate"/><published>2020-02-27T13:49:03.565000Z</published><updated>2020-02-27T13:49:03.565000Z</updated><author><name>mprestel</name><uri>https://forge.codesys.com/u/mprestel/</uri></author><id>https://forge.codesys.com37df732d5d8b28afc55a38478162111bb967f28e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;You should never really do this, if you dont really have to and know you are doing.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Zitat:&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;interface&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;POINTER&lt;/span&gt; &lt;span class="k"&gt;TO&lt;/span&gt; &lt;span class="n"&gt;MyInterface&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ADR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Object_That_implements_MyInterface&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="k"&gt;Is&lt;/span&gt; &lt;span class="n"&gt;this&lt;/span&gt; &lt;span class="n"&gt;what&lt;/span&gt; &lt;span class="n"&gt;you&lt;/span&gt; &lt;span class="n"&gt;mean&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Back to the question:&lt;br/&gt;
Assigning anything but a fb/interface is copying.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br/&gt;
Marcel&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Are Interfaces Pointers/References?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/91abe5ea89/?limit=25#c361" rel="alternate"/><published>2020-02-27T13:49:03.464000Z</published><updated>2020-02-27T13:49:03.464000Z</updated><author><name>fatroshi</name><uri>https://forge.codesys.com/u/fatroshi/</uri></author><id>https://forge.codesys.comdc969b99c1b20a5e4e099404d17a0b1ba9fa1aa4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Josep M. Rams hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
Hi.&lt;br/&gt;
When you declare a variable as an interface, has to be a pointer to an fb which implements this interface.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Hi Josep, &lt;br/&gt;
Do you mean something like this?&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;interface&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;POINTER&lt;/span&gt; &lt;span class="k"&gt;TO&lt;/span&gt; &lt;span class="n"&gt;MyInterface&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ADR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Object_That_implements_MyInterface&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="k"&gt;Is&lt;/span&gt; &lt;span class="n"&gt;this&lt;/span&gt; &lt;span class="n"&gt;what&lt;/span&gt; &lt;span class="n"&gt;you&lt;/span&gt; &lt;span class="n"&gt;mean&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>Are Interfaces Pointers/References?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/91abe5ea89/?limit=25#6e26" rel="alternate"/><published>2020-02-27T13:49:03.149000Z</published><updated>2020-02-27T13:49:03.149000Z</updated><author><name>josepmariarams</name><uri>https://forge.codesys.com/u/josepmariarams/</uri></author><id>https://forge.codesys.com253e55bff4ca8c197302065252742dfcc54a4e31</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;An instance of an FB is a copy of his variables. The methods are the same for all instances of an fb. An FB is an structure with associated methods.&lt;/p&gt;
&lt;p&gt;As an interface has not variables, has no sense talking about instances of interfaces.&lt;/p&gt;
&lt;p&gt;When you declare a variable as an interface, has to be a pointer to an fb which implements this interface.&lt;/p&gt;
&lt;p&gt;An interface by himself could not be anything because has not variables and has nothing to point to.&lt;/p&gt;
&lt;p&gt;Sent from my Moto G (5S) Plus using Tapatalk&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Are Interfaces Pointers/References?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/91abe5ea89/?limit=25#e5ea" rel="alternate"/><published>2020-02-27T13:49:03.060000Z</published><updated>2020-02-27T13:49:03.060000Z</updated><author><name>michaelADE</name><uri>https://forge.codesys.com/u/michaelade/</uri></author><id>https://forge.codesys.com8aaad274b196cb05e566f145f3a4a7714ea5d64a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;So for any who may be interested this is what I found.&lt;/p&gt;
&lt;p&gt;If you make an array of interfaces any objects(function blocks) you write to the array will be REFERENCEs, that is to say that they will be pointers without the need to dereference ^ them. This means that you will need a distinct object for each entry in the array and they will need to remain valid for as long as the array is used.&lt;/p&gt;
&lt;p&gt;However if you make an array of Function Blocks then any objects you write to the array will be entered as a new instance of the the object, so you could use the one (or two in my case) objects as creator objects and after writing them to the array you can change them with no change to the array.&lt;/p&gt;
&lt;p&gt;if anyone is interested in seeing this work i have attached my testing file to show how i tested this.&lt;/p&gt;
&lt;p&gt;&lt;a class="" href="https://forum.codesys.com//download/file.php?id=4055" rel="nofollow"&gt;Testing Files.project &lt;span&gt;&lt;span&gt;[239.38 KiB]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Are Interfaces Pointers/References?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/91abe5ea89/?limit=25#8a25" rel="alternate"/><published>2020-02-27T13:49:02.937000Z</published><updated>2020-02-27T13:49:02.937000Z</updated><author><name>michaelADE</name><uri>https://forge.codesys.com/u/michaelade/</uri></author><id>https://forge.codesys.com6788e3d6bc0cee7a6f0da092e1790aa325d0edc5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hey Scott&lt;/p&gt;
&lt;p&gt;Thanks for your reply so does that mean that arrays are really just references?&lt;/p&gt;
&lt;p&gt;If i made the below call&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;var&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;aMyArray&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;array&lt;/span&gt; &lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="nx"&gt;..3&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt; &lt;span class="nt"&gt;of&lt;/span&gt; &lt;span class="nt"&gt;int&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;iValueOne&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;int&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;iValueTwo&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;int&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;end_var&lt;/span&gt;
&lt;span class="nt"&gt;iValueOne&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;1&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;iValueTwo&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;2&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;aMyArray&lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;iValueOne&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;aMyArray&lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;iValueTwo&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;iValueOne&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;3&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;iValueTwo&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;4&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;aMyArray&lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;iValueOne&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;aMyArray&lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;iValueTwo&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;would that not give me&lt;br/&gt;
aMyArray&lt;span&gt;[0]&lt;/span&gt;= 1&lt;br/&gt;
aMyArray&lt;span&gt;[1]&lt;/span&gt;= 2&lt;br/&gt;
aMyArray&lt;span&gt;[2]&lt;/span&gt;= 3&lt;br/&gt;
aMyArray&lt;span&gt;[3]&lt;/span&gt;= 4&lt;br/&gt;
or would it be &lt;br/&gt;
aMyArray&lt;span&gt;[0]&lt;/span&gt;= 3&lt;br/&gt;
aMyArray&lt;span&gt;[1]&lt;/span&gt;= 4&lt;br/&gt;
aMyArray&lt;span&gt;[2]&lt;/span&gt;= 3&lt;br/&gt;
aMyArray&lt;span&gt;[3]&lt;/span&gt;= 4&lt;/p&gt;
&lt;p&gt;If so have you got any recommendations on how to create a number x of objects at run time?&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Are Interfaces Pointers/References?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/91abe5ea89/?limit=25#e909" rel="alternate"/><published>2020-02-27T13:49:02.837000Z</published><updated>2020-02-27T13:49:02.837000Z</updated><author><name>Anonymous</name><uri>https://forge.codesys.com/u/*anonymous/</uri></author><id>https://forge.codesys.com2c02c88dbc7f23136dfa15f17ecf5fb6be57a691</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;em&gt;Originally created by:&lt;/em&gt; scott_cunningham&lt;/p&gt;
&lt;p&gt;Your issue you found really doesn’t have to do with interfaces. You created two objects, gave them names (name 1 and name 2) and then assigned them to your array. You then renamed your original objects (Name 3 and Name 4) and assigned them to your array again.  If you had four objects, your array would display as you expected.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Are Interfaces Pointers/References?</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/91abe5ea89/?limit=25#e670" rel="alternate"/><published>2020-02-27T13:49:02.680000Z</published><updated>2020-02-27T13:49:02.680000Z</updated><author><name>michaelADE</name><uri>https://forge.codesys.com/u/michaelade/</uri></author><id>https://forge.codesys.comd16e69bcf2a84d75c02b98191fb8f3cd6d748ae5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hey Everyone,&lt;/p&gt;
&lt;p&gt;My intention was to have a generic array of type interface so that i could contain all of the objects that are related to this interface. &lt;/p&gt;
&lt;p&gt;I created a function to loop through, i only created one instance of each type of object used its initialisation function wrote it to the interface array. I would then reuse the same instance of the object recalling the initialisation function again to change it and then write it to the array. However at the end even though my array should have been made up of a number of differently configured arrays everywhere i used the same object the array had whatever the last value was for the object, not the value it had at the time of writing it to the array. Is this what should happen?&lt;strong&gt; Does this imply that an array of type interface is similar to a pointer/reference where it is just linked to the object that was written to it. If i want the array to be filled with unique objects how would i do this? Do i have to make a base FB for the array instead of the interface?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A very simple example of what im talking about can be seen below&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;INTERFACE&lt;/span&gt; &lt;span class="n"&gt;myInterface&lt;/span&gt; &lt;span class="n"&gt;EXTENDS&lt;/span&gt; &lt;span class="n"&gt;__SYSTEM&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;IQueryInterface&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;PROPERTY&lt;/span&gt; &lt;span class="n"&gt;Name&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;STRING&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;FUNCTION_BLOCK&lt;/span&gt; &lt;span class="n"&gt;myFirstClass&lt;/span&gt; &lt;span class="n"&gt;IMPLEMENTS&lt;/span&gt; &lt;span class="n"&gt;myInterface&lt;/span&gt;
&lt;span class="n"&gt;VAR&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;sName&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;STRING&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;END_VAR&lt;/span&gt;
&lt;span class="k"&gt;METHOD&lt;/span&gt; &lt;span class="n"&gt;Initialise&lt;/span&gt; 
&lt;/pre&gt;&lt;/div&gt;


&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;FUNCTION_BLOCK&lt;/span&gt; &lt;span class="n"&gt;myExtendedClass&lt;/span&gt; &lt;span class="n"&gt;EXTENDS&lt;/span&gt; &lt;span class="n"&gt;myFirstClass&lt;/span&gt;
&lt;span class="n"&gt;VAR&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="n"&gt;sName&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;STRING&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;END_VAR&lt;/span&gt;
&lt;span class="k"&gt;METHOD&lt;/span&gt; &lt;span class="n"&gt;Initialise&lt;/span&gt; 
&lt;/pre&gt;&lt;/div&gt;


&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;VAR&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;clsMyFirstClass&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;myFirstClass&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;clsMyExtendedClass&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;myExtendedClass&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;aMyArray&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt; &lt;span class="nt"&gt;array&lt;/span&gt; &lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="nx"&gt;..3&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt; &lt;span class="nt"&gt;of&lt;/span&gt; &lt;span class="nt"&gt;myInterface&lt;/span&gt;
&lt;span class="nt"&gt;END_VAR&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;clsMyFirstClass&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Initialise&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Name 1'&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;clsMyExtendedClass&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Initialise&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Name 2'&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;aMyArray&lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;clsMyFirstClass&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;aMyArray&lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;clsMyExtendedClass&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;clsMyFirstClass&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Initialise&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Name 3'&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;clsMyExtendedClass&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Initialise&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'Name 4'&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;aMyArray&lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;clsMyFirstClass&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="err"&gt; &lt;/span&gt; &lt;span class="err"&gt; &lt;/span&gt;&lt;span class="nt"&gt;aMyArray&lt;/span&gt;&lt;span class="cp"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="cp"&gt;]&lt;/span&gt; &lt;span class="o"&gt;:=&lt;/span&gt; &lt;span class="nt"&gt;clsMyExtendedClass&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;aMyArray&lt;span&gt;[0]&lt;/span&gt;.string = 'Name 3' // I was expecting this to be name 1&lt;br/&gt;
aMyArray&lt;span&gt;[1]&lt;/span&gt;.string = 'Name 4' // I was expecting this to be name 2&lt;br/&gt;
aMyArray&lt;span&gt;[2]&lt;/span&gt;.string = 'Name 3'&lt;br/&gt;
aMyArray&lt;span&gt;[3]&lt;/span&gt;.string = 'Name 4'&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>