POV-Ray : Newsgroups : povray.documentation.inbuilt : dictionary container types : Re: dictionary container types Server Time
18 Apr 2024 07:49:40 EDT (-0400)
  Re: dictionary container types  
From: clipka
Date: 23 Nov 2016 10:04:44
Message: <5835b00c$1@news.povray.org>
Am 23.11.2016 um 13:11 schrieb Jim Holsenback:
> On 11/22/2016 5:25 PM, Jim Holsenback wrote:
>> On 11/19/2016 2:26 PM, clipka wrote:
>>> for the records:
>>
>> thanks for that ... i went ahead and created a talk page:
>> http://wiki.povray.org/content/Reference_Talk:Array
>>
>> i still need to work the new keyword into the syntax diagram and do an
>> overall review of the rest of the page ... go ahead and work over there
>> if you want to make any changes
> 
> finished page clean up and made a stab at the syntax diagram ... please
> review that to make sure that i haven't forgotten or mis-characterized
> anything

Array:

"[...] IDENTIFIER is the name of the identifier up to 40 characters long
[...]"

That's outdated; there is no hard-coded limit for the length of
identifiers anymore.

"Large uninitialized arrays do not take much memory. Internally they are
arrays of pointers so they probably use just 4 bytes per element"

We should probably update that to "8 bytes per element", to account for
the rise of 64-bit machines.


Dictionary:

The DICTIONARY_DECLARATION syntax implies that a DICTIONARY_INITIALIZER
can only be specified with #declare, not with #local. That is not true:
Both #declare and #local allow for a DICTIONARY_INITIALIZER.

The DICTIONARY_ITEM syntax implies that it can be a
DICTIONARY_INITIALIZER; this is also wrong. The corresponding portion of
the array syntax accounts for the nested initializers of
multi-dimensional arrays, but dictionaries always have just one dimension.

The DICTIONARY_ENTRY syntax implies that it can only be an int, float or
string. This is not the case: Anything you can shove into an array can
also be shoved into a dictionary.

The changes to array syntax and behaviour don't fit into the
"Dictionary" section; they should instead be in the "Array" section.


Post a reply to this message

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