Page 1 of 1

OnErrorGosub() renamed to OnErrorProcedure()

Posted: Sun Feb 19, 2006 7:21 pm
by Kale
Pretty self explanitory really, IMHO OnErrorGosub() should be renamed to OnErrorProcedure() because you pass it the address of a procedure not a label as you would during a Gosub call. :P

Posted: Sun Feb 19, 2006 8:19 pm
by Rings
think again about it :)

Code: Select all

OnErrorGosub(?Errorhandler)

MessageRequester("Info","Before the error",0)
b=0
t=2/b
MessageRequester("Info","okay ?",0)

End

Errorhandler:
MessageRequester("Info","Error Stop",0)
Return

Posted: Sun Feb 19, 2006 8:22 pm
by Kale
Rings wrote:think again about it :)

Code: Select all

OnErrorGosub(?Errorhandler)

MessageRequester("Info","Before the error",0)
b=0
t=2/b
MessageRequester("Info","okay ?",0)

End

Errorhandler:
MessageRequester("Info","Error Stop",0)
Return
I see, so it can handle both? Why have the OnErrorGoto command then? :wink:

Posted: Sun Feb 19, 2006 8:23 pm
by Kale
Aha! Let me guess! You can't return from a OnErrorGoto command then?

Posted: Sun Feb 19, 2006 8:30 pm
by Rings
bingo!