[REBOL] Re: Path with integers
From: al:bri:xtra at: 8-Dec-2000 15:21
Giovanni, note the following:
>> b: ["one" "two" "three" "four"]
== ["one" "two" "three" "four"]
>> pick b 3
== "three"
>> b/3
== "three"
>> third b
== "three"
Basically, the "/3" is the same as a 'pick, which is the same as 'third.
This is done to make it clear and simple, that the N-th item in a block can
always be retrieved.
Your cards are probably better written as:
Cards: [
Gold 11 1
Gold 0 2
; and so on.
and then use a 'foreach to create a object for each, like:
Deck: make block! divide length? Cards 3
foreach [Type Value Number] Cards [
insert tail Deck make object! reduce [
'Type: Type
'Value: Value
'Number: Number
]
]
That way your Cards are easily changed, stored and retrieved from
storage.
I hope that helps!
Andrew Martin
ICQ: 26227169 http://members.nbci.com/AndrewMartin/