<?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 Re: dynamic arrays not dynamic in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/dynamic-arrays-not-dynamic/m-p/78662#M39864</link>
    <description>&lt;BLOCKQUOTE&gt;But are you saying that putting NOTHING but a space in the brackets works??? that would create an array without limits!!&lt;/BLOCKQUOTE&gt;

This is exactly what the GDL User Manual says...&lt;BR /&gt;
If you use empty square brachets, the GDL interpreter evaluates the needed size during the compilation. &lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT color="blue"&gt;&lt;B&gt;Chapter 11&lt;/B&gt;&lt;BR /&gt;
Expressions and Functions&lt;BR /&gt;
...&lt;BR /&gt;
Dynamic arrays&lt;BR /&gt;
...&lt;BR /&gt;
Variable expressions cannot be used as dimensions. If they are missing, the array is declared to be dynamic (one or both dimensions).&lt;BR /&gt;
...&lt;BR /&gt;
Parameter arrays do not have to be declared in the script and they are&lt;BR /&gt;
dynamic by default.&lt;BR /&gt;
...&lt;BR /&gt;
For dynamic arrays there is no limitation for the actual index value. During the interpretation, when a non-existing dynamic array element is given a value, the necessary quantity of memory is allocated and the missing elements are all set to 0 (numerical). Warning! This may cause an&lt;BR /&gt;
unexpected out of memory error in some cases.&lt;/FONT&gt;</description>
    <pubDate>Mon, 05 Jul 2004 16:58:09 GMT</pubDate>
    <dc:creator>rocorona</dc:creator>
    <dc:date>2004-07-05T16:58:09Z</dc:date>
    <item>
      <title>dynamic arrays not dynamic</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/dynamic-arrays-not-dynamic/m-p/78659#M39861</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;When AC7 came out, we were told that DIM statements could now work with a variable instead of a fixed number, e.g.&lt;BR /&gt;
&lt;BR /&gt;
num=60&lt;BR /&gt;
DIM xx[num]&lt;BR /&gt;
&lt;BR /&gt;
If you try this, even in ArchiCAD 8.1, it still doesnt work, you still get an error message saying that you must put a valid number into the brackets e.g.&lt;BR /&gt;
&lt;BR /&gt;
DIM xx[60]&lt;BR /&gt;
&lt;BR /&gt;
I havent really chased this one with Gs as i havent needed it, but I wanted it today and couldnt use it.&lt;BR /&gt;
&lt;BR /&gt;
Perhaps the object works, but the error checking routine still reports an error. That is still the case with built in Material definitions.&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 05 Jul 2004 15:10:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/dynamic-arrays-not-dynamic/m-p/78659#M39861</guid>
      <dc:creator>david nicholson-cole</dc:creator>
      <dc:date>2004-07-05T15:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic arrays not dynamic</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/dynamic-arrays-not-dynamic/m-p/78660#M39862</link>
      <description>David,&lt;BR /&gt;
&lt;BR /&gt;
I have made variable arrays successfully with the format:&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;DIM matthews_variable_array [ ][ ]&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
I forget now, but I think a space character is required inside each pair of brackets (I don't feel like launching AC right now to check).&lt;BR /&gt;
&lt;BR /&gt;
HTH,&lt;BR /&gt;
Matthew</description>
      <pubDate>Mon, 05 Jul 2004 15:35:12 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/dynamic-arrays-not-dynamic/m-p/78660#M39862</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-07-05T15:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic arrays not dynamic</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/dynamic-arrays-not-dynamic/m-p/78661#M39863</link>
      <description>&lt;BLOCKQUOTE&gt;Matthew wrote:&lt;BR /&gt;David,&lt;BR /&gt;
I have made variable arrays successfully with the format:&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;DIM matthews_variable_array [ ][ ]&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
I forget now, but I think a space character is required inside each pair of brackets (I don't feel like launching AC right now to check).
&lt;/BLOCKQUOTE&gt;

I know how you feel......&lt;BR /&gt;
But are you saying that putting NOTHING but a space in the brackets works??? that would create an array without limits!!</description>
      <pubDate>Mon, 05 Jul 2004 15:42:56 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/dynamic-arrays-not-dynamic/m-p/78661#M39863</guid>
      <dc:creator>david nicholson-cole</dc:creator>
      <dc:date>2004-07-05T15:42:56Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic arrays not dynamic</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/dynamic-arrays-not-dynamic/m-p/78662#M39864</link>
      <description>&lt;BLOCKQUOTE&gt;But are you saying that putting NOTHING but a space in the brackets works??? that would create an array without limits!!&lt;/BLOCKQUOTE&gt;

This is exactly what the GDL User Manual says...&lt;BR /&gt;
If you use empty square brachets, the GDL interpreter evaluates the needed size during the compilation. &lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT color="blue"&gt;&lt;B&gt;Chapter 11&lt;/B&gt;&lt;BR /&gt;
Expressions and Functions&lt;BR /&gt;
...&lt;BR /&gt;
Dynamic arrays&lt;BR /&gt;
...&lt;BR /&gt;
Variable expressions cannot be used as dimensions. If they are missing, the array is declared to be dynamic (one or both dimensions).&lt;BR /&gt;
...&lt;BR /&gt;
Parameter arrays do not have to be declared in the script and they are&lt;BR /&gt;
dynamic by default.&lt;BR /&gt;
...&lt;BR /&gt;
For dynamic arrays there is no limitation for the actual index value. During the interpretation, when a non-existing dynamic array element is given a value, the necessary quantity of memory is allocated and the missing elements are all set to 0 (numerical). Warning! This may cause an&lt;BR /&gt;
unexpected out of memory error in some cases.&lt;/FONT&gt;</description>
      <pubDate>Mon, 05 Jul 2004 16:58:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/dynamic-arrays-not-dynamic/m-p/78662#M39864</guid>
      <dc:creator>rocorona</dc:creator>
      <dc:date>2004-07-05T16:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic arrays not dynamic</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/dynamic-arrays-not-dynamic/m-p/78663#M39865</link>
      <description>&lt;BLOCKQUOTE&gt;david wrote:&lt;BR /&gt;But are you saying that putting NOTHING but a space in the brackets works??? that would create an array without limits!!&lt;/BLOCKQUOTE&gt;

Shucks, David, I thought that's what you wanted. You do have to be careful not to fill it too much though. A billion values could fill up the available RAM</description>
      <pubDate>Mon, 05 Jul 2004 21:42:06 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/dynamic-arrays-not-dynamic/m-p/78663#M39865</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-07-05T21:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: dynamic arrays not dynamic</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/dynamic-arrays-not-dynamic/m-p/78664#M39866</link>
      <description>&lt;BLOCKQUOTE&gt;david wrote:&lt;BR /&gt;
But are you saying that putting NOTHING but a space in the brackets works??? that would create an array without limits!!&lt;/BLOCKQUOTE&gt;
In a way, yes. But the size of the array would be the last row of array that have been assigned a value. For example:&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT color="red"&gt;DIM xx[][]&lt;BR /&gt;
&lt;BR /&gt;
FOR i=1 to num1&lt;BR /&gt;
  FOR j=1 to num2&lt;BR /&gt;
    xx&lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;&lt;J&gt;=fl_max-flight_length&lt;I&gt;&lt;/I&gt;&lt;S&gt;&lt;I&gt;&lt;I&gt;&lt;/I&gt;&lt;/I&gt;&lt;/S&gt;&lt;J&gt;+dyy&lt;BR /&gt;
  NEXT j&lt;BR /&gt;
NEXT i&lt;BR /&gt;
&lt;BR /&gt;
The size of this particular array is num1xnum2 and it can be retrieved using GDL syntax:&lt;BR /&gt;
&lt;BR /&gt;
  VARDIM1(XX)=num1&lt;BR /&gt;
  VARDIM2(XX)=num2&lt;/J&gt;&lt;/J&gt;&lt;/FONT&gt;</description>
      <pubDate>Wed, 07 Jul 2004 02:08:37 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/dynamic-arrays-not-dynamic/m-p/78664#M39866</guid>
      <dc:creator>LiHigh</dc:creator>
      <dc:date>2004-07-07T02:08:37Z</dc:date>
    </item>
  </channel>
</rss>

