[REBOL] Re: Block as parameter (version 2 !!)
From: al::bri::xtra::co::nz at: 18-Aug-2002 11:52
Philippe Oehler wrote:
> Finally i cannot pass a block as a parameter within a VID layout because
it decomposed into elements of the block instead of a block...
> So the result is that : the function is waiting on a block and the first
element passed is considered as a block..
Best fix at the moment is to change from this:
fonction-update (a-line)
to this:
fonction-update [(a-line)]
Note the addition of the square brackets "[" and "]".
When the latest version of Rebol/View is available, with 'compose/only (from
latest Rebol/Core):
>> help compose
USAGE:
COMPOSE value /deep /only
DESCRIPTION:
Evaluates a block of expressions, only evaluating parens, and returns a
block.
COMPOSE is a native value.
ARGUMENTS:
value -- Block to compose (Type: any)
REFINEMENTS:
/deep -- Compose nested blocks
/only -- Inserts a block value as a block
You'll be able to write:
append big-box reduce compose/deep/only [
:)
I hope that helps!
Andrew Martin
ICQ: 26227169 http://valley.150m.com/