[REBOL] Associative arrays Re:

2000-07-20 Thread agem
i use this: change-or-append: func [series key value /local found-here] [ either found-here: find series :key [change/only next found-here :value] [append/only series :key append/only series :value]] or that now-known: func [ series key ] [ if not find series :key [ append/only series :k

[REBOL] Associative arrays

2000-07-19 Thread rebol
Hi, just wondering what happened to associative arrays. I understand that REBOL's blocks and hashes are powerful, but there's still no easy way as far as I know to just say (like you can in Perl, for instance) $blah{'value'} = "supercalifragilisticexpialidocious", and get the value by just saying

[REBOL] Associative Arrays in Rebol? Re:(3)

2000-03-10 Thread allenk
t;Apple" "Red" >> col/set-item "App" "Office" >> col/get-item "App" == "Office" >> col/get-item "Apple" == "Red" >> col/get-item 1 == "Red" >> col/get-item 2 == "Office"

[REBOL] Associative Arrays in Rebol? Re:(2)

2000-03-10 Thread bpaddock
In article <[EMAIL PROTECTED]>, you wrote: >I think select and paths should come close to what you're asking: >>> select [ a "this is a" b "this is b" ] 'a >== "this is a" I'll have to ponder that for a while but my first thought is that doing it that way would make it difficult to populate it f

[REBOL] Associative Arrays in Rebol? Re:

2000-03-09 Thread icimjs
I think select and paths should come close to what you're asking: for instance: >> select [ a "this is a" b "this is b" ] 'a == "this is a" >> select [ a "this is a" b "this is b" ] 'b == "this is b" >> block: [ a "this is a" b "this is b" ] == [a "this is a" b "this is b"] >> block/a == "this i

[REBOL] Associative Arrays in Rebol?

2000-03-09 Thread bpaddock
Is there any way to simulate Associative Arrays in Rebol? The type where the index could be a list of random words like in the language Awk?

[REBOL] Associative arrays Re:

1999-11-29 Thread icimjs
Hi Keith, you wrote: >Am I right in thinking that the only two ways to simulate associative arrays >as they exist in languages such as Perl and Python are by > >1. Making an object and using it's fields for what would be the indexes >2. Using the select keyword on a block, like so: > >data: ["key1

[REBOL] Associative arrays

1999-11-28 Thread newsletters
Am I right in thinking that the only two ways to simulate associative arrays as they exist in languages such as Perl and Python are by 1. Making an object and using it's fields for what would be the indexes 2. Using the select keyword on a block, like so: data: ["key1" value1 "key2" value2 "key3