<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Array finding the total of index</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/7cc9615b36/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/7cc9615b36/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/7cc9615b36/</id><updated>2022-12-01T08:22:33.866000Z</updated><subtitle>Recent posts to Array finding the total of index</subtitle><entry><title>Array finding the total of index</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/7cc9615b36/?limit=25#e552" rel="alternate"/><published>2022-12-01T08:22:33.866000Z</published><updated>2022-12-01T08:22:33.866000Z</updated><author><name>dumbass</name><uri>https://forge.codesys.com/u/dumbass/</uri></author><id>https://forge.codesys.comdec4838aac90d22ce3b6f932e577a8fe99495de5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thank you, sir.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Array finding the total of index</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/7cc9615b36/?limit=250#6aba" rel="alternate"/><published>2022-11-26T17:31:26.900000Z</published><updated>2022-11-26T17:31:26.900000Z</updated><author><name>h-hermsen</name><uri>https://forge.codesys.com/u/hermsen/</uri></author><id>https://forge.codesys.com5ba64192ffb22cb726844f1c39f1642d34db5df0</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Another  possibility would be to write a class around the array of strings which does the housekeeping for you.&lt;/p&gt;
&lt;p&gt;the main advantage is that your housekeeping code is neatly placed in a single spot.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Array finding the total of index</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/7cc9615b36/?limit=250#4843" rel="alternate"/><published>2022-11-26T17:31:23.191000Z</published><updated>2022-11-26T17:31:23.191000Z</updated><author><name>h-hermsen</name><uri>https://forge.codesys.com/u/hermsen/</uri></author><id>https://forge.codesys.com2fb17ead0ffd4cc35addb6c97fa234f7b4ed1cf3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Another  possibility would be to write a class around the array of strings which does the housekeeping for you.&lt;/p&gt;
&lt;p&gt;the main advantage is that your housekeeping code is neatly placed in a single spot.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Array finding the total of index</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/7cc9615b36/?limit=25#e741" rel="alternate"/><published>2022-11-25T16:22:45.368000Z</published><updated>2022-11-25T16:22:45.368000Z</updated><author><name>kislov</name><uri>https://forge.codesys.com/u/kislov/</uri></author><id>https://forge.codesys.com237e54d4ad36bf1c2b10b3e6cf3e0d6bae796ea2</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Use FOR loop.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="n"&gt;uiIndex&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;

&lt;span class="k"&gt;FOR&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;LOWER_BOUND&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;asArrayOfStrings&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;TO&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;UPPER_BOUND&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;asArrayOfStrings&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;DO&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;

&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="k"&gt;IF&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;asArrayOfStrings&lt;/span&gt;&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;THEN&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;       &lt;/span&gt;&lt;span class="n"&gt;uiIndex&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;uiIndex&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;END_IF&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;

&lt;span class="n"&gt;END_FOR&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</summary></entry><entry><title>Array finding the total of index</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/7cc9615b36/?limit=25#9195" rel="alternate"/><published>2022-11-25T14:03:17.769000Z</published><updated>2022-11-25T14:03:17.769000Z</updated><author><name>dumbass</name><uri>https://forge.codesys.com/u/dumbass/</uri></author><id>https://forge.codesys.com3413ff62937778f4a7031d88ddff8b1548ebd5ad</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello, &lt;/p&gt;
&lt;p&gt;I have an array of String but I do not know how many elements in it. If the user put 3 elements in the array then the total of index = 3. How can I scan all the elements array if it is not equal to '' (&lt;em&gt;meaning NULL&lt;/em&gt;) and get the total of index in the array? &lt;br/&gt;
Thank you in advance&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>