<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Removing an array key (with value) in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/Removing-an-array-key-with-value/m-p/282884#M3402</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;Hi&lt;BR /&gt;&lt;BR /&gt;As a dictionary key can be removed using the function REMOVEKEY (dictionary.key), is there a way to remove an array's key (with value)?&lt;BR /&gt;&lt;BR /&gt;I tried:
&lt;PRE&gt;myDict.myArray[1] = 1
REMOVEKEY(myDict.myArray[1]) &lt;/PRE&gt;
but that does not seem to remove it.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/DIV&gt;</description>
    <pubDate>Tue, 14 Sep 2021 07:00:52 GMT</pubDate>
    <dc:creator>dushyant</dc:creator>
    <dc:date>2021-09-14T07:00:52Z</dc:date>
    <item>
      <title>Removing an array key (with value)</title>
      <link>https://community.graphisoft.com/t5/GDL/Removing-an-array-key-with-value/m-p/282884#M3402</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi&lt;BR /&gt;&lt;BR /&gt;As a dictionary key can be removed using the function REMOVEKEY (dictionary.key), is there a way to remove an array's key (with value)?&lt;BR /&gt;&lt;BR /&gt;I tried:
&lt;PRE&gt;myDict.myArray[1] = 1
REMOVEKEY(myDict.myArray[1]) &lt;/PRE&gt;
but that does not seem to remove it.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Sep 2021 07:00:52 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Removing-an-array-key-with-value/m-p/282884#M3402</guid>
      <dc:creator>dushyant</dc:creator>
      <dc:date>2021-09-14T07:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: Removing an array key (with value)</title>
      <link>https://community.graphisoft.com/t5/GDL/Removing-an-array-key-with-value/m-p/282885#M3403</link>
      <description>Sadly, there is no native way to delete/pop items from an array. This makes it necessary to do a bit of juggling.&lt;BR /&gt;
&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;dim arr[]
  arr[1] = 0.1
  arr[2] = 0.2
  arr[3] = 0.3

! index of the item you want to delete
todelete = 2

dim new_arr[]
check = 0
for i = 1 to vardim1(arr)-1
	if i = todelete then check = 1
	new_arr&lt;I&gt; = arr[i+check]
next i

arr = new_arr

print arr   !&amp;gt;&amp;gt;&amp;gt; will print:  "0.1  0.3"
&lt;/I&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 12 Jul 2021 21:57:32 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Removing-an-array-key-with-value/m-p/282885#M3403</guid>
      <dc:creator>runxel</dc:creator>
      <dc:date>2021-07-12T21:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: Removing an array key (with value)</title>
      <link>https://community.graphisoft.com/t5/GDL/Removing-an-array-key-with-value/m-p/282886#M3404</link>
      <description>Hi runxel&lt;BR /&gt;
&lt;BR /&gt;
Ok, I get the idea. Thanks a lot!</description>
      <pubDate>Tue, 13 Jul 2021 04:24:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/Removing-an-array-key-with-value/m-p/282886#M3404</guid>
      <dc:creator>dushyant</dc:creator>
      <dc:date>2021-07-13T04:24:23Z</dc:date>
    </item>
  </channel>
</rss>

