Announcement

Collapse

Maintenance

The forum could be offline for 30-60 minutes in the very near future for maintenance (said 3pm Pacific). I was behind on getting this notice. I do apologize.
See more
See less

Tranfer of ERR-9 issue to PB 3.5 for DOS please!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tranfer of ERR-9 issue to PB 3.5 for DOS please!

    I've read with interest the now locked thread on ERR=9 issues in the
    PBCC. OK .. exactly what is the precise behavior of the toolset in
    PB 3.5 for DOS, both respect to .EXE's and the IDE and/or the PBD
    operations?

    And that, especially in relation to UNITS, SUBS within them, multiple
    nesting into such SUB's, and how this error handling is affected by
    EXIT FAR at whatever place is set ...

    Inquiring mind wants to know. If ERR=9 does not trap and provide the
    information on exactly where it developes, that is very important to
    me here.



    ------------------
    Mike Luther
    [email protected]
    Mike Luther
    [email protected]

  • #2
    ERR 9 does trip an error trap in PB/DOS.

    How deep? As described in manual (yes, it really works that way!).

    PB/DOS has two types of ON ERROR GOTO.. ON ERROR and ON LOCAL error, so you have to watch which is on. (Not to mention the possibility of $ERROR ALL OFF statements in-line). So using error trapping is more easily ascertained than accomplished.

    MCM


    Michael Mattias
    Tal Systems Inc. (retired)
    Racine WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      Mike, PB/DOS already provides Bounds testing facilities, which are roughly equivalent to #ERROR ALL ON testing in PB/CC. The key difference is that a bounds error in PB/DOS is a "hard" error, but an Error 9 in PB/CC (if it was generated by a bounds error because #DEBUG ERROR ON was active) then it simply sets ERR=9 and does not trigger an error trap (ie, it produces a "soft" error).

      So lets put it this way: error trapping in our DOS compilers is quite different to that of our Windows compilers. For example, there is no Numeric or Overflow error testing facilities in our Windows compilers.

      Or to put it another way: comparing error trapping methods between the two platforms is not going to be an apples/apples comparison, since the design philosophies on error trapping are quite different between the two platforms.

      Further, since error trapping in Window is local to each Sub/Function and the Thread in which its context occurs, any discussions you read on Windows error trapping is unlikely to be very applicable to PB/DOS programming.

      ------------------
      Lance
      PowerBASIC Support
      mailto:[email protected][email protected]</A>
      Lance
      mailto:[email protected]

      Comment


      • #4
        Thanks folks..

        The mule is only trying to get some education..




        ------------------
        Mike Luther
        [email protected]
        Mike Luther
        [email protected]

        Comment

        Working...
        X