Thanks, Richard! This is very helpful.
On Nov 18, 2007, at 11:24 AM, Richard Gaskin wrote:
Petrides, M.D. Marian wrote:
Speaking of arrays... Am I correct in understanding that Rev only
supports one dimensional arrays or am I misreading the dox?
Rev currently supports associative arrays. Unlike numerically
indexed arrays, associative array keys are not restricted to
integers only, and may use just about any string within the
acceptable length range (which in Rev I believe is 64k).
Since numerals can be included in such strings, this gives you the
ability to use numeric indices with associative arrays as you would
with indexed arrays, e.g.:
get tMyArray[1]
But using strings as keys also opens up whole new worlds of indexing
convenience beyond being limited to integers only, such as storing
data by user name for example:
put "Kevin" into tCurrentUser
get tSettingsArray[tCurrentUser]
Because nearly any string can be used as a key, you can use notation
similar to what you'd expect for multi-dimensional arrays to
describe unique elements in associative arrays as well:
get tMyArray[4,4]
For more on associative arrays in general, the Wikipedia entry is a
good starting point:
<http://en.wikipedia.org/wiki/Associative_array>
For more on Rev's implementation of them, search the docs for
"array" or "associative".
--
Richard Gaskin
Managing Editor, revJournal
_______________________________________________________
Rev tips, tutorials and more: http://www.revJournal.com
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution