[REBOL] "picking' from a block.....
From: jfdutcher1958::yahoo::com at: 22-Jul-2004 18:15
The 'add-number' function below calls the 'build-a-blk' function also below.
The 'remove' fails as shown....after the printing of 'add-blk' has
shown its content as: "66", "66", "66", "66", "66", "66", ""
I thought blocks were series.....what is more common than the endless
references to 'picking' block values in RTOC (Rebol, The Official Guide) ?
????
******************************************************************************************
Error from invoking the script:
66
,"66","66","66","66","66",""
** Script Error: remove expected series argument of type: series port bitset none
** Where: add-number
** Near: remove pick add-blk 7
********************************************************************************************
build-a-blk: func [ /local blk][
blk: copy ""
append blk remold to-string num1/text
append blk ","
append blk remold to-string num2/text
append blk ","
append blk remold to-string num3/text
append blk ","
append blk remold to-string num4/text
append blk ","
append blk remold to-string num5/text
append blk ","
append blk remold to-string num6/text
append blk ","
append blk remold to-string num7/text
return blk
]
add-number: func [ /local add-blk block!][
add-blk: build-a-blk
print [add-blk]
remove pick add-blk 7
db-insert lottoReb ["5" "Powerball" reduce add-blk 20-JUL-2004]
return
]