RosettaCodeData/Task/Associative-array-Creation/NetRexx/associative-array-creation.netrexx

13 lines
409 B
Text
Raw Permalink Normal View History

2013-04-10 22:43:41 -07:00
/* NetRexx */
2015-11-18 06:14:39 +00:00
options replace format comments java crossref symbols
2013-04-10 22:43:41 -07:00
key0 = '0'
key1 = 'key0'
hash = '.' -- Initialize the associative array 'hash' to '.'
hash[key1] = 'value0' -- Set a specific key/value pair
say '<hash key="'key0'" value="'hash[key0]'" />' -- Display a value for a key that wasn't set
say '<hash key="'key1'" value="'hash[key1]'" />' -- Display a value for a key that was set