• (nodebb)
    ERN=0
    Index=0
    WHILE ERN<>0
    

    Well, in fact, the body of the loop is of no importance, since ERN is not <>0 at the beginning, so the loop never runs.

  • (nodebb)

    I once saw a database called MinTest. I wasn't too involved with that part of the system at first and assumed it was something about minimum testing, perhaps if candidates for HR. Shortly thereafter though I was introduced to Min, a Korean engineer on another team. I had a weird deja vu feeling.... Then the next day, I found out that MinTest was the HR time sheet database created by Min. She just named it after her name and added the word test. Yes, that database was in production for many years.

  • Prime Mover (unregistered) in reply to Mr. TA

    Three flavours of application access:

    MinT, MinTer and MinTest

  • Officer Johnny Holzkopf (unregistered)

    ON ERROR GOTO FAIL

  • Prime Mover (unregistered) in reply to Officer Johnny Holzkopf

    GOTO FAIL GODIRECTLYTO FAIL DONOT PASS GO DONOT COLLECT $200

  • tbo (unregistered) in reply to Mr. TA

    Honestly, I suspect you have it backwards. I have no doubt that she started with the "test" database created by default on a new installation and "created" a database by renaming it.

  • Exception (unregistered)

    Error-based loop-breaking makes sense for a live-action (ok some people call it real-time) data-handling loop.

  • (nodebb) in reply to tbo

    In MSSQL, it doesn't create any default databases on installation (other than internal built in ones, like master, model, msdb and tempdb).

  • Old timer (unregistered)

    "Structured Exception Handling" is a Microsoft term for a MS Windows Technology. Before vb.net, VB, as an extensible Windows language, could hook into and use Windows API's including "Structured Exception Handling". People never did, for the same reason that people often used c++ exception handling or python exception handling: the native exception handling is more suitable than 'Structured Exception Handling".

    VB.net, like c++ and VB classic, has an exception handling system built on top of the Windows SHH api.

    Alternatively, the OP may have just idiosyncratically stolen the term to apply to nested exception handling. VB classic supported nested exception handling only through the function/subroutine structure, and did not define manifest constants for the exception numbers. This reflected the early adoption of exception handling in interpreted BASIC: compiled languages like c and pascal had to wait until the meta-programming demands of object-oriented languages required application-level supervisors capable of handling dispatch and, by extension, exceptions.

  • (nodebb) in reply to Officer Johnny Holzkopf

    Fortran:

    SOMEBUILTIN(..., IOSTAT=iostat) ! iostat: local integer, passed by reference
    IF(iostat /= 0) GOTO 999        ! Fortran: Can’t even bother with named goto marks.
    
  • (nodebb)

    The first paragraph of the article made me instantly think “Fortran wants a word with you.” Imagine my disappointment, when I lost the chance for that comment in the second paragraph.

    Though I guess it actually makes sense? When using iterators, the iterator ending is expected to be the “exceptional” situation, so you’d expect __next__ throwing StopIteration rather than using a __has_next__ routine to be faster. Except that branch prediction probably throws the performance argument out of the window.

    Or does it in some way I don’t think of make the code cleaner?

    The sad part is, that regardless how much I find inconsistent about the language syntax, often even inconsistent with the “Zen of Python”, it’s still coming out ahead of most other languages.

    And now I’ll return to debugging Fortran. (Send help.)

Leave a comment on “On Error Goto Anywhere but Here”

Log In or post as a guest

Replying to comment #:

« Return to Article