[REBOL] Re: 'do - question
From: andreas:bolka:gmx at: 11-Nov-2001 2:07
Sunday, November 11, 2001, 1:48:14 AM, Andrew wrote:
> Something like this could help:
> o: make object! [
> Quit: does []
> do bind load %MyScriptWithQuit.r 'Quit
> ]
> I hope that helps!
for i 1 5 1 [
print "before"
do [
print 1
print 2
if = i 3 [
quit ; -> here
]
print 3
]
print "after"
]
By overwriting 'quit for that context my intention is to stop the 'do
wherever a quit occurs.
The block for the 'do is really loaded from an external file, which in
turn may load various files and quit's may occur deeply nested.
--
Best regards,
Andreas mailto:[andreas--bolka--gmx--net]