<?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: POLY_A &amp;amp; POLY_B Syntax Errors in Libraries &amp; objects</title>
    <link>https://community.graphisoft.com/t5/Libraries-objects/POLY-A-amp-POLY-B-Syntax-Errors/m-p/69460#M28725</link>
    <description>Hello James :&lt;BR /&gt;
Thank you for your assistance. I've got POLY2_B working as needed.&lt;BR /&gt;
&lt;BR /&gt;
I believe your remark about invisible characters was correct. (And I did copy the code template from the manual and that is probably where that character came from).&lt;BR /&gt;
&lt;BR /&gt;
The other errors were merely the result of the compiler trying its best to pinpoint the problem. &lt;BR /&gt;
&lt;BR /&gt;
Regards : Douglas Wagner</description>
    <pubDate>Fri, 11 Apr 2008 02:17:48 GMT</pubDate>
    <dc:creator>Hubert Wagner</dc:creator>
    <dc:date>2008-04-11T02:17:48Z</dc:date>
    <item>
      <title>POLY_A &amp; POLY_B Syntax Errors</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/POLY-A-amp-POLY-B-Syntax-Errors/m-p/69453#M28718</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;&lt;T&gt;Hello :&lt;BR /&gt;
This has been discussed but I've not found a resolution to a syntax problem with both sub-routines. Nicholson-Cole warns about POLY2_A but appears to be able to use POLY2_B. I can't find a way to use either.&lt;BR /&gt;
&lt;BR /&gt;
eg POLY2_A&amp;nbsp;n, frame_fill, fill_pen, x1, y1, s1, ..., xn, yn, sn &lt;BR /&gt;
&lt;BR /&gt;
POLY2_A&amp;nbsp;5, 3,	3,&lt;BR /&gt;
	0, 			0,     		1,&lt;BR /&gt;
	maxWidth, 	0,     		1,&lt;BR /&gt;
	maxWidth, 	length,     1,&lt;BR /&gt;
	0, 			length,     1,&lt;BR /&gt;
	0, 			0,     		-1&lt;BR /&gt;
&lt;BR /&gt;
One extra parameter :&lt;BR /&gt;
&lt;BR /&gt;
e.g POLY2_B n, frame_fill, fill_pen,fill_background_pen,x1, y1, s1, ..., xn, yn, sn  &lt;BR /&gt;
&lt;BR /&gt;
POLY2_A 5, 3,	3, 3,&lt;BR /&gt;
	0, 			0,     		1,&lt;BR /&gt;
	maxWidth, 	0,     		1,&lt;BR /&gt;
	maxWidth, 	length,     1,&lt;BR /&gt;
	0, 			length,     1,&lt;BR /&gt;
	0, 			0,     		-1&lt;BR /&gt;
&lt;BR /&gt;
The GDL compiler generates a number of errors :&lt;BR /&gt;
1  Illegal character in line 22 (the first line)&lt;BR /&gt;
2  Keywords can't be used as variables in line 22&lt;BR /&gt;
3  Parameter expression error or unnecessary end comma in line 22 (I've tried with and without the end comma in line 22)&lt;BR /&gt;
&lt;BR /&gt;
Has anyone managed to get these sub-routines working?&lt;BR /&gt;
&lt;BR /&gt;
I request the code be tried to see it it works as written. If not please post the modified code in the reply.&lt;BR /&gt;
&lt;BR /&gt;
Regards : Douglas Wagner&lt;/T&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 08 Apr 2008 21:46:29 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/POLY-A-amp-POLY-B-Syntax-Errors/m-p/69453#M28718</guid>
      <dc:creator>Hubert Wagner</dc:creator>
      <dc:date>2008-04-08T21:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: POLY_A &amp; POLY_B Syntax Errors</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/POLY-A-amp-POLY-B-Syntax-Errors/m-p/69454#M28719</link>
      <description>I copied your code for the POLY2_A command and it works as written&lt;BR /&gt;
with no errors. I did define a fill and a pen (FILL "Empty Fill" and PEN 6)&lt;BR /&gt;
but that does not explain why you are getting errors.&lt;BR /&gt;
I have no explanation for why you are getting errors.&lt;BR /&gt;
Peter Devlin</description>
      <pubDate>Wed, 09 Apr 2008 02:52:40 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/POLY-A-amp-POLY-B-Syntax-Errors/m-p/69454#M28719</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2008-04-09T02:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: POLY_A &amp; POLY_B Syntax Errors</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/POLY-A-amp-POLY-B-Syntax-Errors/m-p/69455#M28720</link>
      <description>Hello Peter :&lt;BR /&gt;
Thank you for your reply.&lt;BR /&gt;
&lt;BR /&gt;
Please post the entire sub-routine as you've written it. I believe there must be a way of writing the parameters which I've overlooked.&lt;BR /&gt;
&lt;BR /&gt;
Where and how do you define the fill and pen? &lt;BR /&gt;
&lt;BR /&gt;
The code below doesn't work either. &lt;BR /&gt;
&lt;BR /&gt;
Replacing the double quotes with single quotes make no difference.&lt;BR /&gt;
&lt;BR /&gt;
	POLY2_A&amp;nbsp;5, "Empty Fill",	6,&lt;BR /&gt;
		0, 			0,     		1,&lt;BR /&gt;
		maxWidth, 	0,     		1,&lt;BR /&gt;
		maxWidth, 	length,     1,&lt;BR /&gt;
		0, 			length,     1,&lt;BR /&gt;
		0, 			0,     		-1&lt;BR /&gt;
&lt;BR /&gt;
Regards : Douglas Wagner</description>
      <pubDate>Wed, 09 Apr 2008 13:15:31 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/POLY-A-amp-POLY-B-Syntax-Errors/m-p/69455#M28720</guid>
      <dc:creator>Hubert Wagner</dc:creator>
      <dc:date>2008-04-09T13:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: POLY_A &amp; POLY_B Syntax Errors</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/POLY-A-amp-POLY-B-Syntax-Errors/m-p/69456#M28721</link>
      <description>Frame_fill is not a fill name, it's a bit of binary arithmetic like a status code. It controls whether the contour (1), or the fill (2), or both (1+2=3) is drawn. And other stuff, see the manual.&lt;BR /&gt;
&lt;BR /&gt;
Set the fill, then do the shape.&lt;BR /&gt;
&lt;BR /&gt;
FILL "Empty Fill"&lt;BR /&gt;
&lt;BR /&gt;
POLY2_B etc...</description>
      <pubDate>Wed, 09 Apr 2008 15:35:16 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/POLY-A-amp-POLY-B-Syntax-Errors/m-p/69456#M28721</guid>
      <dc:creator>James Murray</dc:creator>
      <dc:date>2008-04-09T15:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: POLY_A &amp; POLY_B Syntax Errors</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/POLY-A-amp-POLY-B-Syntax-Errors/m-p/69457#M28722</link>
      <description>Hello James :&lt;BR /&gt;
Thank you for your reply.&lt;BR /&gt;
However, I don't entirely understand your point.&lt;BR /&gt;
&lt;BR /&gt;
You appear to be suggesting the code below.&lt;BR /&gt;
&lt;BR /&gt;
FILL "Solid Fill"&lt;BR /&gt;
POLY2_A&amp;nbsp;5, 3,	3&lt;BR /&gt;
	0, 			0,     		1,&lt;BR /&gt;
	maxWidth, 	0,     		1,&lt;BR /&gt;
	maxWidth, 	length,     1,&lt;BR /&gt;
	0, 			length,     1,&lt;BR /&gt;
	0, 			0,     		-1&lt;BR /&gt;
&lt;BR /&gt;
where the "3" following the "5" is the frame_fill code.&lt;BR /&gt;
This produces the series of errors I described in my first post.&lt;BR /&gt;
&lt;BR /&gt;
POLY2_A&amp;nbsp;5, 2+1,	3&lt;BR /&gt;
This doesn't work either.&lt;BR /&gt;
&lt;BR /&gt;
I've read the manual, of course. Indeed, Peter was able to run my code without errors. There appears to be something more subtle going on here.&lt;BR /&gt;
&lt;BR /&gt;
Regards : Douglas Wagner</description>
      <pubDate>Wed, 09 Apr 2008 15:54:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/POLY-A-amp-POLY-B-Syntax-Errors/m-p/69457#M28722</guid>
      <dc:creator>Hubert Wagner</dc:creator>
      <dc:date>2008-04-09T15:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: POLY_A &amp; POLY_B Syntax Errors</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/POLY-A-amp-POLY-B-Syntax-Errors/m-p/69458#M28723</link>
      <description>&lt;BLOCKQUOTE&gt;Douglas wrote:&lt;BR /&gt;Hello James :&lt;BR /&gt;
Thank you for your reply.&lt;BR /&gt;
However, I don't entirely understand your point.&lt;/BLOCKQUOTE&gt;

This syntax is wrong:&lt;BR /&gt;

&lt;PRE&gt;POLY2_A 5, "Empty Fill",	6,&lt;/PRE&gt;

&lt;BLOCKQUOTE&gt;&lt;PRE&gt;FILL "Solid Fill" 
POLY2_A 5, 3,	3 
0, 0, 1, 
maxWidth, 0, 1, 
maxWidth, length, 1, 
0, length, 1, 
0, 0, -1 &lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;

In that bit you're missing a comma at the end of the first line. "Not enough parameters", the only error I got, can be caused by missing commas. I tested it with the comma and it works.&lt;BR /&gt;
&lt;BR /&gt;
Both items in your original post work too, once you change the second POLY2_A to a B.&lt;BR /&gt;
&lt;BR /&gt;
The errors you describe there are familiar. Sometimes when pasting text from web pages or PDF into a script you can get invisible nonsense characters, very annoying. Try mouse-highlighting text before and after the code, or forward-deleting at the end of each line, or typing it over.</description>
      <pubDate>Wed, 09 Apr 2008 17:02:36 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/POLY-A-amp-POLY-B-Syntax-Errors/m-p/69458#M28723</guid>
      <dc:creator>James Murray</dc:creator>
      <dc:date>2008-04-09T17:02:36Z</dc:date>
    </item>
    <item>
      <title>Re: POLY_A &amp; POLY_B Syntax Errors</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/POLY-A-amp-POLY-B-Syntax-Errors/m-p/69459#M28724</link>
      <description>&lt;BLOCKQUOTE&gt;James wrote:&lt;BR /&gt; invisible nonsense&lt;/BLOCKQUOTE&gt;

Another trick is to do a select-all on the text. Bumpy empty lines are a clue; delete them. (Though the pic is a spacebar-simulation of the effect.)</description>
      <pubDate>Wed, 09 Apr 2008 17:07:50 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/POLY-A-amp-POLY-B-Syntax-Errors/m-p/69459#M28724</guid>
      <dc:creator>James Murray</dc:creator>
      <dc:date>2008-04-09T17:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: POLY_A &amp; POLY_B Syntax Errors</title>
      <link>https://community.graphisoft.com/t5/Libraries-objects/POLY-A-amp-POLY-B-Syntax-Errors/m-p/69460#M28725</link>
      <description>Hello James :&lt;BR /&gt;
Thank you for your assistance. I've got POLY2_B working as needed.&lt;BR /&gt;
&lt;BR /&gt;
I believe your remark about invisible characters was correct. (And I did copy the code template from the manual and that is probably where that character came from).&lt;BR /&gt;
&lt;BR /&gt;
The other errors were merely the result of the compiler trying its best to pinpoint the problem. &lt;BR /&gt;
&lt;BR /&gt;
Regards : Douglas Wagner</description>
      <pubDate>Fri, 11 Apr 2008 02:17:48 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Libraries-objects/POLY-A-amp-POLY-B-Syntax-Errors/m-p/69460#M28725</guid>
      <dc:creator>Hubert Wagner</dc:creator>
      <dc:date>2008-04-11T02:17:48Z</dc:date>
    </item>
  </channel>
</rss>

