POV-Ray : Newsgroups : povray.binaries.scene-files : Error on run macros loops declarations something's amiss Server Time
27 Dec 2024 16:17:52 EST (-0500)
  Error on run macros loops declarations something's amiss (Message 1 to 5 of 5)  
From: Bald Eagle
Subject: Error on run macros loops declarations something's amiss
Date: 6 Mar 2016 01:20:04
Message: <web.56db192ddfca65025e7df57c0@news.povray.org>
I just spent a lot of time getting all the array loops to work without error,
and now POV complains
Parse Error: Expected 'RValue to declare', End of File found instead
or if I comment out the #end where it chokes, then I get "end of file reached,
but #end expected.

As far as I can see, all my #locals have a ; and all my #fors have an #end

Hoping someone can help me spot where in the chain it's all going wrong.
I'll keep hunting backward

(This is theird time I'm posting this - seems to be a problem getting it to
"take" via the web interface)


Post a reply to this message


Attachments:
Download 'retrobezier.pov.txt' (9 KB)

From: dick balaska
Subject: Re: Error on run macros loops declarations something's amiss
Date: 6 Mar 2016 02:44:24
Message: <56dbdfd8$1@news.povray.org>
On 3/5/2016 12:36 PM, Bald Eagle wrote:
> I just spent a lot of time getting all the array loops to work without error,
> and now POV complains
> Parse Error: Expected 'RValue to declare',

Because there is no RValue returned from computeControlPoints(K)

At the bottom of computeControlPoints, where you have
//return {p1:p1, p2:p2};
commented out, you need something there. Like
(p1[0])
if that were the value you were returning.

-- 
dik


Post a reply to this message

From: clipka
Subject: Re: Error on run macros loops declarations something's amiss
Date: 6 Mar 2016 03:00:34
Message: <56dbe3a2@news.povray.org>
Am 05.03.2016 um 18:36 schrieb Bald Eagle:
> I just spent a lot of time getting all the array loops to work without error,
> and now POV complains
> Parse Error: Expected 'RValue to declare', End of File found instead
> or if I comment out the #end where it chokes, then I get "end of file reached,
> but #end expected.
> 
> As far as I can see, all my #locals have a ; and all my #fors have an #end

According to how it is used, your macro `computeControlPoints(K)` should
expand to a value, but it expands to nothing.


Post a reply to this message

From: Bald Eagle
Subject: Re: Error on run macros loops declarations something's amiss
Date: 6 Mar 2016 16:40:01
Message: <web.56dca281699a1a555e7df57c0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:

Fixed a lot of code, tried to get it all packaged up into a macro for repeated
use, but I'm stumbling on something again.
Scope, or the way I'm expanding the macro return value.
I define array CPX as the result of my macro's generation of array P[], but then
when I go to look at CPX it tells me it's uninitialized.
Also strange is that the message window doesn't even display the "i = " before
it terminates with an error at the NEXT line.

Can someone please school me?


> According to how it is used, your macro `computeControlPoints(K)` should
> expand to a value, but it expands to nothing.


Post a reply to this message


Attachments:
Download 'retrobeziermacrotest.pov.txt' (8 KB)

From: clipka
Subject: Re: Error on run macros loops declarations something's amiss
Date: 6 Mar 2016 17:24:39
Message: <56dcae27@news.povray.org>
Am 06.03.2016 um 22:35 schrieb Bald Eagle:

> Also strange is that the message window doesn't even display the "i = " before
> it terminates with an error at the NEXT line.

"#debug" output isn't actually written until an end-of-line ("\n") is
output.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.