<?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: AND OR !?!?!?! in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/AND-OR/m-p/68379#M40503</link>
    <description>Sorry, i was wrong, and Oleg is right. Laszlo too.&lt;BR /&gt;
&lt;BR /&gt;
It is because the lenght of your line exceeds 255 characters&lt;BR /&gt;
that the error message occurs.&lt;BR /&gt;
Try Oleg's solution, it works great.&lt;BR /&gt;
Nothing to see with the dash lines, except perhaps if the user&lt;BR /&gt;
select them, but it depends how your script is written.</description>
    <pubDate>Fri, 11 Jun 2004 13:36:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2004-06-11T13:36:24Z</dc:date>
    <item>
      <title>AND OR !?!?!?!</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/AND-OR/m-p/68372#M40496</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;R&gt;How come GDL can understand this:&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;if StartSide= 'Notch' or StartSide= 'Top Notch' or StartSide= 'Bottom Notch' or StartSide= 'Reverse Top Notch' or StartSide= 'Reverse Notch' and EndSide= 'Reverse Notch' then&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
And not this:&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;if StartSide= 'Notch' or StartSide= 'Top Notch' or StartSide= 'Bottom Notch' or StartSide= 'Reverse Top Notch' or StartSide= 'Reverse Notch' and EndSide= 'Notch' or EndSide= 'Top Notch' or EndSide= 'Bottom Notch' or EndSide= 'Reverse Top Notch' or EndSide= 'Reverse Notch' then&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
Unless I'm missing something very simple (as a missing "quote","equal", or etc...) the problem I see is that whenever I have more than 1 "or" after the "and" it gives me an error. &lt;BR /&gt;
&lt;BR /&gt;
If there an easier way to get the same solution feel free to bash away!  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_lol.gif" style="display : inline;" /&gt;  I got thick skin. (I'm still learning new things in GDL every time I fool with it.)&lt;BR /&gt;
&lt;BR /&gt;
Here is what I'm trying to achieve. (BTW I work for a log home company.) When one of the logs in the house is notched it can be defined in 5 different notches (within a drop down list of parameters) or it will be tag as "Normal" for no notch (which is also in the same drop down list). So within GDL when it notices that the log has a notch on one side it will run an equation to figure out the material needed. If the log has a notch on both sides then it will double that amount.&lt;/R&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;IMG src="https://community.graphisoft.com/t5/image/serverpage/image-id/37567i76DDC34030A5100E/image-size/large?v=v2&amp;amp;px=999" border="0" alt="Log 1.60.jpg" title="Log 1.60.jpg" /&gt;</description>
      <pubDate>Thu, 10 Jun 2004 20:53:47 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/AND-OR/m-p/68372#M40496</guid>
      <dc:creator>Red</dc:creator>
      <dc:date>2004-06-10T20:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: AND OR !?!?!?!</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/AND-OR/m-p/68373#M40497</link>
      <description>I assume notch at both end do not have to be the same.&lt;BR /&gt;
an easier way would be:&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;IF StartSide&amp;lt;&amp;gt;"Normal" AND Endside&amp;lt;&amp;gt;"Normal THEN&lt;BR /&gt;
..........(both end notched)............&lt;BR /&gt;
ELSE&lt;BR /&gt;
..........(at least one end is normal)............&lt;BR /&gt;
ENDIF&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
 &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_wink.gif" style="display : inline;" /&gt;</description>
      <pubDate>Fri, 11 Jun 2004 00:57:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/AND-OR/m-p/68373#M40497</guid>
      <dc:creator>LiHigh</dc:creator>
      <dc:date>2004-06-11T00:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: AND OR !?!?!?!</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/AND-OR/m-p/68374#M40498</link>
      <description>Maybe you should include some parantheses to create two blocks (both having all ORs withing them) and then place the AND between the two block.&lt;BR /&gt;
&lt;BR /&gt;
if StartSide= ('Notch' or StartSide= 'Top Notch' or StartSide= 'Bottom Notch' or StartSide= 'Reverse Top Notch' or StartSide= 'Reverse Notch') and (EndSide= 'Notch' or EndSide= 'Top Notch' or EndSide= 'Bottom Notch' or EndSide= 'Reverse Top Notch' or EndSide= 'Reverse Notch') then &lt;BR /&gt;
&lt;BR /&gt;
I haven't tried it, so I am just guessing this might work.&lt;BR /&gt;
Laszlo</description>
      <pubDate>Fri, 11 Jun 2004 08:46:36 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/AND-OR/m-p/68374#M40498</guid>
      <dc:creator>Laszlo Nagy</dc:creator>
      <dc:date>2004-06-11T08:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: AND OR !?!?!?!</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/AND-OR/m-p/68375#M40499</link>
      <description>In the list values i would delete the lines with "------",&lt;BR /&gt;
because i guess AC cannot interpretate them&lt;BR /&gt;
Same thing for "error". &lt;BR /&gt;
Not sure but maybe.</description>
      <pubDate>Fri, 11 Jun 2004 09:11:48 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/AND-OR/m-p/68375#M40499</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-06-11T09:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: AND OR !?!?!?!</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/AND-OR/m-p/68376#M40500</link>
      <description>The length of a code line is limited. I think, you have exceeded allowable length.&lt;BR /&gt;
You can continue expression on the next line having placed \ char at the end of a line.&lt;BR /&gt;
&lt;BR /&gt;
Except for that I think, that you have a logic mistake. AND have the higher precedence over OR (like multiplication over addition) and you need to use brackets as Laszlo suggested.&lt;BR /&gt;
&lt;BR /&gt;
For example:&lt;BR /&gt;
1+2*3+4  differs from (1+2) * (3+4) right ?&lt;BR /&gt;
it is like 1+(2*3)+4 &lt;BR /&gt;
As well &lt;BR /&gt;
A1 or A2 and A3 or A4 is same as A1 or (A2 and A3) or A4&lt;BR /&gt;
but not (A1 or A2) and (A3 or A4)&lt;BR /&gt;
Did you are expected like this ?&lt;BR /&gt;
&lt;BR /&gt;
Try this:
&lt;PRE&gt;if  (StartSide= 'Notch' or\
   StartSide= 'Top Notch' or\
   StartSide= 'Bottom Notch' or\
   StartSide= 'Reverse Top Notch' or\
   StartSide= 'Reverse Notch')\
   and\
   (EndSide= 'Notch' or\
   EndSide= 'Top Notch' or\
   EndSide= 'Bottom Notch' or\
   EndSide= 'Reverse Top Notch' or\
   EndSide= 'Reverse Notch') then
! some code
ENDIF&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Jun 2004 10:24:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/AND-OR/m-p/68376#M40500</guid>
      <dc:creator>Oleg</dc:creator>
      <dc:date>2004-06-11T10:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: AND OR !?!?!?!</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/AND-OR/m-p/68377#M40501</link>
      <description>&lt;BLOCKQUOTE&gt;Olivier wrote:&lt;BR /&gt;In the list values i would delete the lines with "------",&lt;BR /&gt;
because i guess AC cannot interpretate them&lt;BR /&gt;
Same thing for "error". &lt;BR /&gt;
Not sure but maybe.&lt;/BLOCKQUOTE&gt;

I wasn't the one that originally made the part, but I have often wondered what the dashes were for in the parameter list. &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_question.gif" style="display : inline;" /&gt;  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_question.gif" style="display : inline;" /&gt;  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_question.gif" style="display : inline;" /&gt;</description>
      <pubDate>Fri, 11 Jun 2004 12:11:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/AND-OR/m-p/68377#M40501</guid>
      <dc:creator>Red</dc:creator>
      <dc:date>2004-06-11T12:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: AND OR !?!?!?!</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/AND-OR/m-p/68378#M40502</link>
      <description>&lt;BLOCKQUOTE&gt;Red wrote:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;Olivier wrote:&lt;BR /&gt;In the list values i would delete the lines with "------",&lt;BR /&gt;
because i guess AC cannot interpretate them&lt;BR /&gt;
Same thing for "error". &lt;BR /&gt;
Not sure but maybe.&lt;/BLOCKQUOTE&gt;

I wasn't the one that originally made the part, but I have often wondered what the dashes were for in the parameter list. &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_question.gif" style="display : inline;" /&gt;  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_question.gif" style="display : inline;" /&gt;  &lt;IMG src="https://community.graphisoft.com/legacyfs/online/emojis/icon_question.gif" style="display : inline;" /&gt;&lt;/BLOCKQUOTE&gt;

I imagine that the author probably put the dashes in as separator lines. It may be graphically desirable but is questionable programming.</description>
      <pubDate>Fri, 11 Jun 2004 13:23:40 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/AND-OR/m-p/68378#M40502</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-06-11T13:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: AND OR !?!?!?!</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/AND-OR/m-p/68379#M40503</link>
      <description>Sorry, i was wrong, and Oleg is right. Laszlo too.&lt;BR /&gt;
&lt;BR /&gt;
It is because the lenght of your line exceeds 255 characters&lt;BR /&gt;
that the error message occurs.&lt;BR /&gt;
Try Oleg's solution, it works great.&lt;BR /&gt;
Nothing to see with the dash lines, except perhaps if the user&lt;BR /&gt;
select them, but it depends how your script is written.</description>
      <pubDate>Fri, 11 Jun 2004 13:36:24 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/AND-OR/m-p/68379#M40503</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2004-06-11T13:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: AND OR !?!?!?!</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/AND-OR/m-p/68380#M40504</link>
      <description>&lt;BLOCKQUOTE&gt;Oleg wrote:&lt;BR /&gt;The length of a code line is limited. I think, you have exceeded allowable length.&lt;BR /&gt;
You can continue expression on the next line having placed \ char at the end of a line.&lt;BR /&gt;
&lt;BR /&gt;
Except for that I think, that you have a logic mistake. AND have the higher precedence over OR (like multiplication over addition) and you need to use brackets as Laszlo suggested.&lt;BR /&gt;
&lt;BR /&gt;
For example:&lt;BR /&gt;
1+2*3+4  differs from (1+2) * (3+4) right ?&lt;BR /&gt;
it is like 1+(2*3)+4 &lt;BR /&gt;
As well &lt;BR /&gt;
A1 or A2 and A3 or A4 is same as A1 or (A2 and A3) or A4&lt;BR /&gt;
but not (A1 or A2) and (A3 or A4)&lt;BR /&gt;
Did you are expected like this ?&lt;BR /&gt;
&lt;BR /&gt;
Try this:
&lt;PRE&gt;if  (StartSide= 'Notch' or\
   StartSide= 'Top Notch' or\
   StartSide= 'Bottom Notch' or\
   StartSide= 'Reverse Top Notch' or\
   StartSide= 'Reverse Notch')\
   and\
   (EndSide= 'Notch' or\
   EndSide= 'Top Notch' or\
   EndSide= 'Bottom Notch' or\
   EndSide= 'Reverse Top Notch' or\
   EndSide= 'Reverse Notch') then
! some code
ENDIF&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;

Thanks that worked! &lt;BR /&gt;
&lt;BR /&gt;
In the process I learned something new today about GDL. Thanks again Oleg</description>
      <pubDate>Fri, 11 Jun 2004 15:02:03 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/AND-OR/m-p/68380#M40504</guid>
      <dc:creator>Red</dc:creator>
      <dc:date>2004-06-11T15:02:03Z</dc:date>
    </item>
  </channel>
</rss>

