Hi Eike,

Eike Rathke schrieb:
Hi Regina,

On Sunday, 2008-04-13 13:25:25 +0200, Regina Henschel wrote:

Can I use
    throw errNoConvergence;
for example in this way?

    do
    ...
    while (!bFinished && fCount<10000);
    if (fCount>=10000)
    {
        throw errNoConvergence;
    }
    return fApprox;

If it works in this way with throw, does ScGammaDist() need a try..catch?

You can use

    if (fCount>=10000)
    {
        SetError( errNoConvergence);
        return;
    }

and in the calling function

    if (nGlobalError)
    {
        PushError( nGlobalError);
        return;
    }

assuming that is the interpreter function handling the parameter stack.

OK, that's clear. I have used it now in the gamma function and it works. But what to do, if I detect a "NoConvergence" in a function, that is not member of ScInterpreter, like local functions which are used as helper? I get this problem in the helper functions which calculate power series and continued fraction, which are needed for the incomplete gamma functions.

kind regards
Regina

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to