<?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: is there a DEF in gdl? I mean defining functions. in GDL</title>
    <link>https://community.graphisoft.com/t5/GDL/is-there-a-DEF-in-gdl-I-mean-defining-functions/m-p/361065#M1516</link>
    <description>&lt;P&gt;The problem is that GDL is a really old language (I think it first appeared in 1983) and therefore is based on really old BASIC.&amp;nbsp; Structured programming concepts like functions unfortunately come from later versions of BASIC.&amp;nbsp; It seems that a lot of extra features have been added but the underlying language structure hasn't been significantly improved.&lt;/P&gt;</description>
    <pubDate>Fri, 04 Nov 2022 00:02:16 GMT</pubDate>
    <dc:creator>neilmcallister</dc:creator>
    <dc:date>2022-11-04T00:02:16Z</dc:date>
    <item>
      <title>is there a DEF in gdl? I mean defining functions.</title>
      <link>https://community.graphisoft.com/t5/GDL/is-there-a-DEF-in-gdl-I-mean-defining-functions/m-p/360829#M1507</link>
      <description>&lt;P&gt;I've been hearing time and time that GDL is based of BASIC. I know that it doesn't have everything that BASIC has but I'm also a bit weirded out that GDL doesn't have basic programming structure like functions. I haven't seen any mention of defining functions in the GDL resource. They do however have mentioned functions to basic stuff but not me creating one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there anyway to create functions? seems like macros are the closest to functions?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 04:26:05 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/is-there-a-DEF-in-gdl-I-mean-defining-functions/m-p/360829#M1507</guid>
      <dc:creator>Jack D</dc:creator>
      <dc:date>2022-11-02T04:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: is there a DEF in gdl? I mean defining functions.</title>
      <link>https://community.graphisoft.com/t5/GDL/is-there-a-DEF-in-gdl-I-mean-defining-functions/m-p/360831#M1508</link>
      <description>&lt;P&gt;Use macros if you want to access them from multiple objects.&lt;/P&gt;
&lt;P&gt;Use sub-routines if just within the one object.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 05:04:21 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/is-there-a-DEF-in-gdl-I-mean-defining-functions/m-p/360831#M1508</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2022-11-02T05:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: is there a DEF in gdl? I mean defining functions.</title>
      <link>https://community.graphisoft.com/t5/GDL/is-there-a-DEF-in-gdl-I-mean-defining-functions/m-p/360850#M1509</link>
      <description>&lt;P&gt;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/7331"&gt;@Barry Kelly&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm just rebounding on your reply about macros as I would like to know if macros should be categorized as "macro" ? I usually keep the same subtype as the actual object and make it not placeable but is it bad practice ? I do so because the macro seems to lose some of the default parameters of specific subtypes while doing so...&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 09:23:59 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/is-there-a-DEF-in-gdl-I-mean-defining-functions/m-p/360850#M1509</guid>
      <dc:creator>MetalFingerz</dc:creator>
      <dc:date>2022-11-02T09:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: is there a DEF in gdl? I mean defining functions.</title>
      <link>https://community.graphisoft.com/t5/GDL/is-there-a-DEF-in-gdl-I-mean-defining-functions/m-p/360851#M1510</link>
      <description>&lt;P&gt;What you are doing is fine.&lt;/P&gt;
&lt;P&gt;A macro can be any object, even a placeable one.&lt;/P&gt;
&lt;P&gt;But if you don't want it to show in the library object dialogue, make it not placeable as you have done.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The sub-type does affect the default parameters.&lt;/P&gt;
&lt;P&gt;So yes, just choose the sub-type that suits you best - the same sub-type as the CALLing object is ideal as you have discovered.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 09:38:45 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/is-there-a-DEF-in-gdl-I-mean-defining-functions/m-p/360851#M1510</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2022-11-02T09:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: is there a DEF in gdl? I mean defining functions.</title>
      <link>https://community.graphisoft.com/t5/GDL/is-there-a-DEF-in-gdl-I-mean-defining-functions/m-p/360936#M1511</link>
      <description>&lt;P&gt;So are you saying that&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;x=1&lt;/P&gt;&lt;P&gt;gosub "potato"&lt;/P&gt;&lt;P&gt;russet = x&lt;/P&gt;&lt;P&gt;end&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"potato":&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; x=x+1&lt;/P&gt;&lt;P&gt;return&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;so you're saying that "russet" in line 3 is equivalent to 2? yeah I'm still wrapping my head around how data flow in Archicad. I had a conversation about this with my colleague and how he did our library. I think I got too used to other languages that needs you to be more explicit with it's input and output. The other thing that confuses me is if subroutines follow encapsulation.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 22:06:28 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/is-there-a-DEF-in-gdl-I-mean-defining-functions/m-p/360936#M1511</guid>
      <dc:creator>Jack D</dc:creator>
      <dc:date>2022-11-02T22:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: is there a DEF in gdl? I mean defining functions.</title>
      <link>https://community.graphisoft.com/t5/GDL/is-there-a-DEF-in-gdl-I-mean-defining-functions/m-p/360945#M1512</link>
      <description>&lt;P&gt;internal flow control statements do not have encapsulation.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AllanP_1-1667428868462.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/31290i39A8389FABF0B733/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AllanP_1-1667428868462.png" alt="AllanP_1-1667428868462.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if you use an external macro using the "call" function, that does have encapsulation.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AllanP_0-1667428651142.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/31289iC4456D1C568443F8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AllanP_0-1667428651142.png" alt="AllanP_0-1667428651142.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and remember script order&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AllanP_3-1667429297972.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/31292i5DA59FB56622850A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AllanP_3-1667429297972.png" alt="AllanP_3-1667429297972.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AllanP_4-1667429317364.png" style="width: 400px;"&gt;&lt;img src="https://community.graphisoft.com/t5/image/serverpage/image-id/31293iB65B2723239F5C66/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AllanP_4-1667429317364.png" alt="AllanP_4-1667429317364.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Nov 2022 22:48:56 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/is-there-a-DEF-in-gdl-I-mean-defining-functions/m-p/360945#M1512</guid>
      <dc:creator>AllanP</dc:creator>
      <dc:date>2022-11-02T22:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: is there a DEF in gdl? I mean defining functions.</title>
      <link>https://community.graphisoft.com/t5/GDL/is-there-a-DEF-in-gdl-I-mean-defining-functions/m-p/360958#M1513</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.graphisoft.com/t5/user/viewprofilepage/user-id/22207"&gt;@Jack D&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;so you're saying that "russet" in line 3 is equivalent to 2? &lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Exactly.&lt;/P&gt;
&lt;P&gt;x was equal to 1.&lt;/P&gt;
&lt;P&gt;You 'GOSUB'ed to a routine that added 1 to the value of x and then returned to continue the original script.&lt;/P&gt;
&lt;P&gt;You then say russet equals x and as x equals 2, russet now equals 2 as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Barry.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 01:46:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/is-there-a-DEF-in-gdl-I-mean-defining-functions/m-p/360958#M1513</guid>
      <dc:creator>Barry Kelly</dc:creator>
      <dc:date>2022-11-03T01:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: is there a DEF in gdl? I mean defining functions.</title>
      <link>https://community.graphisoft.com/t5/GDL/is-there-a-DEF-in-gdl-I-mean-defining-functions/m-p/360960#M1514</link>
      <description>&lt;P&gt;yeah it's kinda making sense now. I just figured that everything is the input and everything is the output.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 02:03:51 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/is-there-a-DEF-in-gdl-I-mean-defining-functions/m-p/360960#M1514</guid>
      <dc:creator>Jack D</dc:creator>
      <dc:date>2022-11-03T02:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: is there a DEF in gdl? I mean defining functions.</title>
      <link>https://community.graphisoft.com/t5/GDL/is-there-a-DEF-in-gdl-I-mean-defining-functions/m-p/361054#M1515</link>
      <description>&lt;P&gt;As others already said, there are subroutines and macros, and you can utilize them to suit your needs. However just keep in mind that subroutines do not create a scope, which means that all variables are always global and can be altered in a subroutine.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Nov 2022 20:22:30 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/is-there-a-DEF-in-gdl-I-mean-defining-functions/m-p/361054#M1515</guid>
      <dc:creator>runxel</dc:creator>
      <dc:date>2022-11-03T20:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: is there a DEF in gdl? I mean defining functions.</title>
      <link>https://community.graphisoft.com/t5/GDL/is-there-a-DEF-in-gdl-I-mean-defining-functions/m-p/361065#M1516</link>
      <description>&lt;P&gt;The problem is that GDL is a really old language (I think it first appeared in 1983) and therefore is based on really old BASIC.&amp;nbsp; Structured programming concepts like functions unfortunately come from later versions of BASIC.&amp;nbsp; It seems that a lot of extra features have been added but the underlying language structure hasn't been significantly improved.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 00:02:16 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/is-there-a-DEF-in-gdl-I-mean-defining-functions/m-p/361065#M1516</guid>
      <dc:creator>neilmcallister</dc:creator>
      <dc:date>2022-11-04T00:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: is there a DEF in gdl? I mean defining functions.</title>
      <link>https://community.graphisoft.com/t5/GDL/is-there-a-DEF-in-gdl-I-mean-defining-functions/m-p/361078#M1517</link>
      <description>&lt;P&gt;I'm slowly realising this and also many concepts I've learnt over the years don't quite work with gdl. well sort of... I can still do "callback" via macros. But it's not that intuitive.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Nov 2022 01:17:03 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/GDL/is-there-a-DEF-in-gdl-I-mean-defining-functions/m-p/361078#M1517</guid>
      <dc:creator>Jack D</dc:creator>
      <dc:date>2022-11-04T01:17:03Z</dc:date>
    </item>
  </channel>
</rss>

