[REBOL] Re: 'do - question
From: carl:cybercraft at: 11-Nov-2001 12:38
On 11-Nov-01, Andreas Bolka wrote:
> Hi Rebols!
> One question related to 'do: is there a chance for a block beeing
> "done" to halt the "doing"-process.
> Some example for clarification:
> -- snip --
> [
> REBOL []
> bl: [
> print "a"
> print "b"
> if ... [ ??? ]
> print "c
> ]
> do bl
> ]
> -- snip
> When the '...' condition holds, the "do" should stop.
Would turning your block into a function be okay? ie...
REBOL []
bl: [
print "a"
print "b"
if 1 = 1 [return]
print "c"
]
do does bl
print "Still running here."
Note the "do does bl". So...
>> do %test.r
a
b
Still running here.
--
Carl Read