<?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/CODESYS-V2/thread/1277b67adf/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/1277b67adf/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/1277b67adf/</id><updated>2023-03-03T11:07:05.674000Z</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/CODESYS-V2/thread/1277b67adf/?limit=25#0962" rel="alternate"/><published>2023-03-03T11:07:05.674000Z</published><updated>2023-03-03T11:07:05.674000Z</updated><author><name>ben1</name><uri>https://forge.codesys.com/u/ben1/</uri></author><id>https://forge.codesys.com276d22c0ed73c3679fabbcebcf075ffa8f52a25f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Count := 0;&lt;/p&gt;
&lt;p&gt;FOR i:=(First element of array eg.0) TO (Last element of array eg.10) DO&lt;br/&gt;
    IF String&lt;span&gt;[i]&lt;/span&gt; = '' THEN&lt;br/&gt;
        Count := Count;&lt;br/&gt;
    ELSE&lt;br/&gt;
        Count := Count + 1;&lt;br/&gt;
    END_IF;&lt;br/&gt;
END_FOR;&lt;/p&gt;
&lt;p&gt;This will add 1 to the 'Count' in each instance that the String has any value other than NULL in it.&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/CODESYS-V2/thread/1277b67adf/?limit=25#8d13" rel="alternate"/><published>2022-11-25T14:03:22.306000Z</published><updated>2022-11-25T14:03:22.306000Z</updated><author><name>dumbass</name><uri>https://forge.codesys.com/u/dumbass/</uri></author><id>https://forge.codesys.comad6c439070d363658e7f867f6160647a2b864bc0</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>