POV-Ray : Newsgroups : povray.binaries.images : How to concatenate an identifier? Server Time
29 Mar 2024 08:44:49 EDT (-0400)
  How to concatenate an identifier? (Message 11 to 12 of 12)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Bald Eagle
Subject: Re: How to concatenate an identifier?
Date: 28 Sep 2020 13:20:00
Message: <web.5f721a50c09da16c1f9dae300@news.povray.org>
"jr" <cre### [at] gmailcom> wrote:
perhaps a new version 2 of the macro could (should?)
> be added to the POV-Ray/povr distributions, putting the user "in charge".  eg:

A "new  version 2" should handle it all in memory, with no requirement for
write-to-disk.

Some other similar function simply to be able to access identifier values with
their text names would be useful.
#local _vector = evaluate_id ("myVector");

Identifying the type/cast of the variable would be great too, as well as some
internal identifier number (for use in loops, arrays, etc).


Post a reply to this message

From: William F Pokorny
Subject: Re: How to concatenate an identifier?
Date: 1 Oct 2020 06:19:46
Message: <5f75ad42$1@news.povray.org>
On 9/28/20 1:16 PM, Bald Eagle wrote:
> "jr" <cre### [at] gmailcom> wrote:
> perhaps a new version 2 of the macro could (should?)
>> be added to the POV-Ray/povr distributions, putting the user "in charge".  eg:
> 
> A "new  version 2" should handle it all in memory, with no requirement for
> write-to-disk.
> 
> Some other similar function simply to be able to access identifier values with
> their text names would be useful.
> #local _vector = evaluate_id ("myVector");
> 
> Identifying the type/cast of the variable would be great too, as well as some
> internal identifier number (for use in loops, arrays, etc).
> 
> 
Jr and Bill, good ideas.

I updated my povr version so it accepts an optional argument for the 
file name. This forces users to at least think about it because they 
must at least add a comma given how the optional argument feature works 
as in:

Parse_String("THING1",)

but hopefully what they'll do is use something like:

Parse_String("THING1","/tmp/Scene22_wibblyWobbly_parse_stringyWingy")

and if /tmp is a ramdisk as it is on my system, it speeds up the 
operation considerably.

Something future thing all in memory better, but someday...

With respect to evaluate_id unsure. If you are just an ID to and ID you 
can do this today:

#declare THING1 = 0.111;
#declare THING2 = THING1;

If want to do this with a string you can use:

#declare THING2 = Parse_String("THING1",);

Getting the internal type could be done I guess. A number too. But with 
both these and the latter more than the former - it would start to bind 
how and what changes could be made within the parser code. Down the list 
I think.

Bill P.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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