Hi Volker,

you wrote:
>My problem is: i dont know the arg of 'do. its a parameter. 
>type? destroys the result. i can not store it before, because 
>this can cause an error. i can not [try [a: do b] because the error
>can be caused by code in 'b . maybe something like
>[try [ a: try [b]], but this gets complicated. 

Not very elegant, but this works:

>> unset 'a
>> result: []
== []
>> insert result do [print "hi"]
hi
== []
>> if not unset? first result [a: first result] clear head result
== []
>> value? 'a
== false
>> insert result do [1 + 1]
== []
>> if not unset? first result [a: first result] clear head result
== []
>> value? 'a
== true
>> a
== 2

Hope this helps,


;- Elan >> [: - )]

Reply via email to