POV-Ray : Newsgroups : povray.text.scene-files : foreach macro Server Time
6 May 2024 05:48:08 EDT (-0400)
  foreach macro (Message 29 to 30 of 30)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: jr
Subject: Re: foreach macro
Date: 11 May 2021 17:10:00
Message: <web.609af1dfd564bfd479819d986cde94f1@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> ...
> the html "man" page has been updated to reflect all changes, ...

due to faulty thinking and .. laziness </sigh> I had assumed that the underlying
array is not affected when the current element is modified (in the payload).
wrong.  worse, I wrote in the man page that it's safe to do.  then I ran into
trouble with a trashed array in some scene code + realised.  v sorry.  the
corrected man page is attached.


regards, jr.


Post a reply to this message


Attachments:
Download 'foreach.html.htm' (24 KB)

From: jr
Subject: Re: foreach macro
Date: 13 May 2021 13:25:00
Message: <web.609d5fc6d564bfd479819d986cde94f1@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
> ...

a discussion in another thread made me look at various files in the '/scenes/'
directories, with view of updating code to "modern" v 3.8 SDL.

I have attached a zip with a few files, crudely adapted for 'Foreach()' use[*].
 (ideally they'd be re-written such as not to have a new "dependency")

[*] that is existing code surrounded with '#if (0) ... #end', followed by a
functionally equivalent foreach, and '#version' set where needed.


regards, jr.


Post a reply to this message


Attachments:
Download 'foreaches.zip' (19 KB)

<<< Previous 10 Messages Goto Initial 10 Messages

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