Delete an Array Entry?
dave at looktowindward.com
Fri Mar 2 08:41:17 CST 2007
Please see comment below regarding the documentation in RunRev.
All the Best
On 3/2/07, Dave <dave at looktowindward.com> wrote:
Whoever wrote the
> documentation didn't understand how Arrays in RunRev work. If they
> had been called something less confusing then the problem would not
> have arisen and I wouldn't have wasted time!
Having neither programmed in SNOBOL4 of SPTOBOL I have no clue as to
pitfalls await those who have when they come across to Rev, but you
to take up the invitation on the very first page of the Rev Docs:
Please send all comments and feedback to:
userguide at runrev.com
All comments will be read and you will receive a reply.
> From my perspective I don't believe that changing the name from
> Array to
Table would solve much if the example still uses the number 17. If the
delete global myTable[seventeen] --removes the element whose key is
'seventeen' from the array
I believe would not have wasted your time, but then again I haven't
Rev with your background so I'll leave it up to you as to what send to
userguide at runrev.com to help others not fall into the same trap you
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
On 2 Mar 2007, at 11:57, Dave wrote:
> On 1 Mar 2007, at 19:02, J. Landman Gay wrote:
>> Dave wrote:
>>> When I read the part quoted above in the documentation I thought
>>> for a moment that myArray 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.
> The Documentation says:
> delete global myArray -- removes 17th element of that array
> Does this delete the 17th element of the array? No (except if "17"
> just happens to be at position 17). Therefore it's wrong. It makes
> no sense at all to talk about numeric values to "index" into a
> RunRev based array. There is really no such thing as the 17th (or
> any other index) in an RunRev array.
> The documentation is unclear. It should read:
> delete global myArray -- removes the array element whose key is
> 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!
>>> 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
> Well he should have known better then!
> Have a great weekend - I know I will!
> All the Best
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the use-livecode