POV-Ray : Newsgroups : povray.general : Automatically named identifiers : Re: Automatically named identifiers Server Time
21 Nov 2024 08:07:15 EST (-0500)
  Re: Automatically named identifiers  
From: Kenneth
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

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