Hi Ladislav,

I was less than clear. The kount stuff was to simulate "other processing".
The value needs to be set for processing and to report the type in the error
message. My mistake for over simplifying the examples, and for stuffing them
up. Here is the actual function I was working on:

    bayes: function [
        {Calculate combined probability.}
        [catch] probabilities [any-block!]
    ] [p0 p1 d] [
        p0: p1: 1.0
        if not parse probabilities [
            any [
                set value number! (p0: value * p0 p1: 1 - value * p1) |
                set value any-type! to end skip
            ]
        ] [throw make error! reduce ['script 'cannot-use 'bayes mold type?
get/any 'value]]
        if zero? d: add p0 p1 [throw make error! "The probabilities cannot
be combined."]
        divide p0 d
    ]

Sorry for the confusion.
Brett.


> Hi Brett,
>
> I don't know, why you didn't write it as follows:
>
>     f3: func [
>         [catch]
>         block [block!]
>     ] [
>         if not parse block [any [number!] end] [
>             throw make error! "F3 can only process numbers."
>         ]
>     ]
>
> The parse rule contains END only for compatibility with my proposed PARSE
> behaviour, otherwise it isn't necessary.
>
> Cheers
> -L


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to