|
|
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
|
|
|
|
"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
|
|