Delete an Array Entry?
J. Landman Gay
jacque at hyperactivesw.com
Thu Mar 1 14:02:47 EST 2007
Dave wrote:
> When I read the part quoted above in the documentation I thought for a
> moment that myArray[17] was some special usage and wasted times checking
> that it worked the way I thought it worked. There is really no point in
> describing the RunRev type of Array in these terms since there is no
> element 17 or any other numeric index.
Under "delete variable", the docs say: "The arrayIndex is a key of an
array variable. If an arrayIndex is specified instead of a variable
name, the delete variable command removes that element of the array,
without deleting the rest of the elements in the array."
It seems pretty clear that the delete command will remove an array
element with the key you specify. That's how associative arrays work.
> Whoever wrote the documentation
> didn't understand how Arrays in RunRev work.
That would be hard to believe. Jeanne DeVoto, who wrote most of the
documentation, is one of the foremost documentation experts on xtalk
scripting, starting with HyperCard, where she was one of the authors of
the definitive reference book for that program. She has been working
with the language for 20 years, and I'm certain she understands how
arrays work in Revolution. But if you haven't worked much with
associative arrays, I can see how it could be confusing.
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list