Associative array/Creation: Difference between revisions
→{{header|EasyLang}}
(→Insitux: implementation) |
|||
Line 2,749:
# typed (coerces to float)</syntaxhighlight>
=={{header|EasyLang}}==
# use array of array for this
▲</syntaxhighlight>
▲ break 2
▲proc indexStrAssoc index$ . array$[][] item$ .
▲ for i = 1 to len array$[][]
▲ if array$[i][1] = index$
▲ item$ = array$[i][2]
.
.
item$ = ""
.
clothing$[][] = [ [ "type" "t-shirt" ] [ "color" "red" ] ]
clothing$[][] &= [ "size" "xl" ]
#
hashGet "color" clothing$[][] col$
print col$
</syntaxhighlight>
|