Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] 'get'ing a 'word from a block

From: tim::johnsons-web::com at: 31-Dec-2002 18:39

Hello Rebols: I have an example below where foreach sets a block of values, but I don't know how to retain those values within the block when I pass the block to another function:
>> d: [a b c]
== [a b c]
>> blk: [1 2 3 4 5 6 7 8 9]
== [1 2 3 4 5 6 7 8 9]
>> test: func[row[block!]][?? row ?? a] >> foreach :d blk[?? a ?? b ?? c test d]
a: 1 b: 2 c: 3 ; foreach sets the values in the block correctly row: [a b c] ; the words are passed in the block to 'test ** Script Error: a has no value ** Where: rejoin ** Near: mold name: get name ; alas, can't get the value What am I doing wrong here? TIA -- Tim Johnson <[tim--johnsons-web--com]> http://www.alaska-internet-solutions.com http://www.johnsons-web.com