[J3] [EXTERNAL] Re: Exception handling - Golang proposal

Van Snyder van.snyder at jpl.nasa.gov
Wed Jul 24 16:05:39 EDT 2019


On Wed, 2019-07-24 at 12:38 -0600, Ondřej Čertík via J3 wrote:
> 
> On Wed, Jul 24, 2019, at 10:59 AM, Van Snyder via J3 wrote:
> ... 
> > So far, nobody has proposed anything like the "try" function for
> > Fortran.
> 
> Actually I proposed exactly that here:
> 
> https://mailman.j3-fortran.org/pipermail/j3/2019-February/011242.html
> 
> while we met at the February meeting. I am not sold on any of the approaches, but I would like the committee to please seriously evaluate all these options and Pros and Cons of each.
> 
> Ondrej

I had forgotten that proposal.  Does it only work for subroutines?  How
about functions?  How about statements that can produce errors and have
STAT variables?  How about something like the square root of a negative
number occurring within an assignment statement, or within an expression
in another statement before the statement gets to its "guts?"  For
example,

  rewind ( int(4.51 * sqrt(x)), iostat=mystat )

wherein X is negative?  The "rewind" part of the "rewind" statement
doesn't begin until after the "sqrt(x)" has failed.




More information about the J3 mailing list