POV-Ray : Newsgroups : povray.general : L-Systems in Povray : Re: L-Systems in Povray Server Time
27 Jul 2024 18:34:14 EDT (-0400)
  Re: L-Systems in Povray  
From: Bald Eagle
Date: 10 Jul 2023 13:50:00
Message: <web.64ac43e2453cebfc1f9dae3025979125@news.povray.org>
"Droj" <803### [at] drojde> wrote:

> Be warned Povray complains: Expected 'array identifier', undeclared identfier
> 'Vertices' found instead.

So, I dabbled a bit with this to get it to work, and it seems that you're
running into the same sort of weird behaviour of the parser that I was running
into with my kumiko triangles.  POV-Ray should definitely be assigning a value -
any value - to Vertices, but it doesn't.

In order to force the issue, I changed the ending of the macro to:
#declare Vertices = Return;
Vertices


and then POV-Ray crashed, almost immediately.

So I'm again strongly suggesting that there IS a bug, Lvalues are NOT getting
defined when they are clearly being declared in the usual manner.  I've done
this sort of thing before for years, and it's not a newbie error, bad syntax, or
some misunderstanding about how things get declared.  I changed all of the
pertinent #local statements to #declare, and all manner of other hocus pocus to
try to get the macro to work.

_Something_ is going awry in the source code that has something to do with the
scope of variables declared in macros, and possibly include files.  Since jr
(and IIRC someone else) looked into this and tested my triangle code and it
seemed to work for them, the problem seems to be system architecture / OS /
version / build dependent.

So - I don't see you doing anything wrong - I think there's a real problem that
doesn't seem like it will be easy to track down.

I do suggest that you take that into account and see if you can code a
workaround, and plug in a few lines of debugging code to see what gets defined,
what the array dimensions are as the code progresses, and how many iterations of
loops you're instantiating - since I'm not sure what's making my monkey-wrenched
code trigger a hard crash.

- BW


Post a reply to this message


Attachments:
Download 'lsys7_bw_crashes.pov.txt' (5 KB)

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