|
|
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: In v3.8 it is expected to have
the name `povray.chm`, while in v3.7 it has the name `povray37.chm`.
This means v3.8.0-alpha cannot open the help file of a v3.7 it is
dropped into, unless you copy it to the new name (a simple link should
suffice); on the other hand you can leverage it to drop in the v3.8
inbuilt help from the source package.
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.
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).
> 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.
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.
Post a reply to this message
|
|