Error getting tags :
error 404Error getting tags :
error 404 keys | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
keys
Basics
Expander triangle
Type
Function
Syntax

the keys of arrayName keys(arrayName)

Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Returns a list of the element names in an array variable.
Examples

the keys of myArray
repeat with thisItem = 1 to the number of lines in the keys of it
repeat for each line tKey in the keys of tArray
put tArray[tKey] & return after tArrayContents
end repeat

Additional Comments
Expander triangle

Use the keys function to manage the elements of an array, or to perform some action on each element in an array.

Parameters:

The arrayName is the name of a variable.

Value:

The keys function returns a list of keys, one per line.

Note: The order of the keys is not alphabetical or chronological; it is based on the internal order. To obtain an alphabetical list of keys, use the sort command:

put the keys of myArray into myVariable

sort lines of myVariable

Note: Arrays in Revolution are associative (also known as hash tables). This means that the keys of an array are strings which Revolution uses to "look up" the array elements rather than numeric indices as in C, Pascal and other languages. Of course it is possible to use numeric values for array keys, but Revolution will internally convert these into strings before retrieving the array elements

User Comments
Expander triangle