Hmm.. If you needed to do that several times within the
repend block, then I would make a nice function to help.
DEFAULT was somebody else's idea, I think it went
something like this:

        default: func [
                code [block!] fault [block!] 
                /local err
        ][
                either error? set/any 'err try code fault [err]
        ]

Examples:

        default [join "apples" "pears"]["no good"]
        ;== "applespears"

        default [join "apples" "pears" / 0]["no good"]
        ;== "no good"

        repend result [
                default [
                        read aDirectory/:fileName/:chapter-info
                ][
                        join "Couldn't read: " copy/part fileName back tail 
fileName
                ]
                ...
        ]

Anton.

> What if I want to place under repend result [ ]
> following statement:
> 
> if error? try [
>       repend result read to-file join aDirectory join fileName 
> form chapter-
> info
> ][
>       repend result copy/part fileName back tail fileName 
> ]
> 
> is it possible only with: 
> 
> either error? try [
>       read to-file join aDirectory join fileName form chapter-info
> ][
>       copy/part fileName back tail fileName 
> ][
>       read to-file join aDirectory join fileName form chapter-info
> ]
> 
> ?
> 
> Janeks

-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to