POV-Ray : Newsgroups : povray.general : Automatically named identifiers Server Time
23 Nov 2024 20:34:55 EST (-0500)
  Automatically named identifiers (Message 11 to 13 of 13)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Kenneth
Subject: Re: Automatically named identifiers
Date: 7 Nov 2024 11:55:00
Message: <web.672cef10523ee18491c33a706e066e29@news.povray.org>
kurtz le pirate <kur### [at] freefr> wrote:
> On 06/11/2024 21:45, Kenneth wrote:
>
> >
> > It would be an interesting exercise to try and re-code the macro itself,
> > to see if [the Parse_String macro] could be made to deal with multiple
> > entries...and to create multiple written .tmp files as well.
> >
>
> Have you looked my method ?
>

Oh! You already solved that, wow. And *without* creating multiple .tmp files. I
apologize for not grasping what what your code does; I took only a cursory
glance at it while I was working out my own tests. (The beginning of your code
kind of threw me off...
       // name of include file containing splines
          #declare FileName = "Splines.inc";

I mistakenly thought that you were somehow manipulating the *original*
splines.inc include file; sorry!)

So your code actually writes *multiple* #declares to the same .tmp file (called
Splines.inc), to be used later. Excellent.

Thanks for (re-)calling my attention to it. ;-)

-----
BTW: Sorry, Thomas, for calling you Warren. I don't know where *that* came from!
:-O


Post a reply to this message

From: Kenneth
Subject: Re: Automatically named identifiers
Date: 7 Nov 2024 13:10:00
Message: <web.672d025b523ee18491c33a706e066e29@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:
>
> Here's a #for-loop example that might *seem* to be a way to do it. Even though
> it works code-wise as SDL, the result is not what might be expected:
>
> ...
>
> #for(i,1,3)
> Parse_String(concat("declare MY_VECTOR_",str(i,0,0)," = <",
> vstr(3,My_Vector_Array[i-1],", ",0,1),">;"))
> #end
>
> This actually creates only ONE #declare, the final one:
> #declare MY_VECTOR_3 = <.3,.5,.8>;
>

Actually, that one #declare would mistakenly be...
    declare MY_VECTOR_3 = <.3,.5,.8>;
(no hash symbol at the beginning)

The Parse_String line above should have been this:

Parse_String(concat("#declare MY_VECTOR_",...

Sorry for the syntax mistake.


Post a reply to this message

From: kurtz le pirate
Subject: Re: Automatically named identifiers
Date: 9 Nov 2024 06:26:45
Message: <672f46f5$1@news.povray.org>
On 07/11/2024 17:49, Kenneth wrote:
>         // name of include file containing splines
>            #declare FileName = "Splines.inc";
> 
> I mistakenly thought that you were somehow manipulating the*original*
> splines.inc include file; sorry!)


Sorry for my clumsy choice for the file name.




-- 
kurtz le pirate
compagnie de la banquise


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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