Delete an Array Entry?
Richard Gaskin
ambassador at fourthworld.com
Fri Mar 2 11:47:41 EST 2007
Dave wrote:
> The documentation is unclear. It should read:
>
> delete global myArray[17] -- removes the array element whose key is
> "17".
>
> note: the use of 17 here does not refer to a numeric index, but
> rather to a key that is used to look up the element in the array. It
> is possible to use the array in a similar fashion to the more
> traditional array found in languages such as C and Pascal since
> RunRev converts the numeric value to a string automatically.
>
> Or something like that!
Good suggestion. I've submitted your request for you:
<http://quality.runrev.com/qacenter/show_bug.cgi?id=4493>
But you needn't burden yourself with a dependence on me or anyone else
here. You can submit requests yourself at <http://quality.runrev.com>.
This is the type of thing where threads tend to go south here:
>>> 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.
>
> Well he should have known better then!
First, Jeanne is a woman.
Second, that a mistake is made in any product's documentation does not
necessarily mean the author doesn't understand the concepts involved,
nor does finding such a mistake mean the author is fair game for insults.
I'll be perfectly honest with you: the Rev documentation contains some
errors and omissions.
And I hope you're sitting down for this next one, as it may shock your
very core: Nearly all software products (certainly all that I've seen in
20+ years) have errors and omissions in their documentation.
Sorry to have to break it to you, but the sooner you accept the
complexity of shipping software products, the sooner you'll be able to
deal with your own customers more effectively when they find errors and
omissions in your product documentation. I hope they report them to you
in a way that doesn't insult your experience, since that would be as
unnecessary as it is unproductive.
I don't know how many thousands of pages of documentation you've
written, and I'll admit I've written fewer than 10,000 pages over my
career thus far. But through those modest efforts I've come to
appreciate the difficulty of the task, and -- as with code -- I've come
to accept that in this imperfect world products will be imperfect.
Fortunately with software, unlike cars and space shuttles, we get a
second chance. Commercial software is almost always delivered in a
series of versions, and each new version offers an opportunity to
address errors and omissions found in the last one.
So yes, you've found something in the docs which is technically in most
cases an error. Good job. Your diligence is appreciated.
And now that I've submitted your request for you, and now that you
understand that Rev's are associative arrays and how associative arrays
work, may we get back on a productive track to address specifically how
these arrays are causing a problem in your work?
There are a lot of people here who try to be helpful. For example, I've
shown you twice now how the syntax for working with associative arrays
in Rev is largely identical to how one might use numeric arrays, and how
you can use the unrestricted types of keys in associative arrays for a
broader range of solutions beyond what numeric arrays can support.
I'm confident that if you can share with us the specific problem you're
facing with using associative arrays, some of the folks here can help
you solve that problem.
--
Richard Gaskin
Fourth World Media Corporation
___________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list