|
|
In article <slr### [at] fwicom>, ron### [at] povrayorg
wrote:
> Yes, but then it couldn't be used for the sort of iden() tricks this whole
> thing started with, nor for the sparse or dynamic arrays others have asked
> for.
Like I said: "it would be a little more limited". Probably not worth it.
However, it should do a pretty good imitation of sparse/dynamic arrays
if used in combination with a iden() function/macro, and be fairly
simple to implement.
> I prefer the [] notation to the () notation,
So do I, now that I have thought about it more.
> but I wish there were a third alternative besides {}, because either
> [] or () is going to require the person reading the code to find the
> declaration to know what's going on.
Will it? There isn't a lot of difference between a key and an index, at
least not to most people...it will be pretty well understood that
Array[Var] will retrieve element Var of array Array, whether Array is an
associative array or an ordinary array and whether Var is a scalar,
string, vector...
If someone uses Array["ParticleSpeed"], it is pretty obvious it is an
associative array, if they use Array[5] there is an ambiguity, but it
usually won't matter.
--
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
<><
Post a reply to this message
|
|