|
|
hi,
clipka <ano### [at] anonymousorg> wrote:
> Am 30.08.2018 um 21:38 schrieb jr:
>
> > is it ok to just make and copy the new executable into place, or have any of the
> > supporting files (docs etc) changed too?
> There's a caveat regarding the help file: ... `povray37.chm`.
this is a for a Linux box. :-)
> I haven't gotten around to updating the v3.8 help file to the latest
> Wiki contents yet, so it may be a bit behind.
when you do, can you please add information regarding the new, relaxed upper
limit for strings? I found a few mentions of it [limit] not applying any more,
but no number for the new limit. also for the colour_map entry, iirc.
> Other than that, there are no really interesting changes to the support
> files, so there's no reason to copy them as well (and besides, v3.7
> wouldn't like it).
ok. thanks.
> > on one of the new (in 3.8) features: I don't think there's a way to enumerate
> > the keys of a dictionary? could that (function ?) be added?
>
> Not yet. I had pondered different approaches to facilitate this, but
> wasn't happy with any of them, so decided to postpone that problem for now.
>
> From a user's perspective the most straightforward approach would have a
> for-each directive to iterate over all the entries in the dictionary,
> possibly like so:
>
> #for(K,Dict)
> #debug concat("Key='",K,"' Value='",Dict[K],"'\n")
> #end
>
> However, this comes with pitfalls in cases where the dictionary is
> modified during the loop, e.g. to add more entries or remove the current
> entry.
agree, an iterator ("general purpose"?) would be clean, maybe even '#foreach()'.
would it not be acceptable to take a "snap-shot" and make that available, on the
(documented) understanding that it is simply the state at that time, and is read
only?
I ask because I think a dictionary could be a handy mechanism for macro
parameters and "package configuration" for stand-alone include files.
> Another approach that avoids these issues would be to have a function
> that would construct an array holding all the keys, which you could then
> iterate over like so:
>
> #local KeyArray = keys(Dict);
> #for(I,0,dimension_size(Keys,1))
> #local K = KeyArray[I];
> #debug concat("Key='",K,"' Value='",Dict[K],"'\n")
> #end
>
> However, this would be more memory-heavy, maybe also slower, and more
> cumbersome to use.
a snap-shot in other words. (I don't see why function + iterator would have to
be exclusive :-))
regards, jr.
Post a reply to this message
|
|