[REBOL] Re: Passing hash keys to functions
From: lmecir:mbox:vol:cz at: 29-Dec-2004 12:07
Premshree Pillai napsal(a):
>Hi,
>
>I'm trying to write a function that accepts a key as an argument, and
>then returns the corresponding value.
>
>Some code:
>
>hsh: make hash! []
>append hsh [a [1 2] b [3 4]]
>
>get-val: func [of no] [
> print hsh/#of/#no
>]
>
>the get-val function above accepts two arguments. If I pass a and 1 as
>the argument it should return the value of hsh/a/1.
>
>Thoughts?
>
See http://www.compkarori.com/vanilla/display/aa.r , it may be of some use.
-Ladislav