Re: Handling branch cuts for hypergeometric function s
Subject: Re: Handling branch cuts for hypergeometric function s
From: Viktor T. Toth
Date: Mon, 14 Feb 2005 18:11:37 -0500
> Take a look at errcatch/error or catch/throw before defining anything new.
LOL. Good point.
Though this mechanism may not be doing quite what Ray and I were discussing:
it doesn't allow an exception handler, for instance, that'd ask the user if
X>0 and then allow the calculation to continue.
Upon reflection, what we need may actually be simpler than I thought.
Perhaps all we need is a function, the default definition of which does
nothing and returns TRUE, and which could be overridden by the programmer.
In pseudocode, a program that wants to ask the user if X>0 could then do
something like this:
if (MayAskForRange(errorcode)#false) then
... ask for range ...
else
... terminate or continue ...
endif
Since the default implementation of MayAskForRange() does nothing, we have
the current (interactive) behavior. But if a programmer provides his own
version of MayAskForRange(), that function could do whatever the programmer
wants: terminate the program, do a THROW, an ASSUME, anything.
Any thoughts?
Viktor