I am trying to be careful to not mix-match terminology, but.
for this question think of DDT = PB Functions, and SDK = API Functions
If an error occurs does that error code only exist until another function sets or resets that value? or is it only good for the next line of code?
I understand that I can not call a DDT style function and expect a API style check for error can not work (or report incorrectly) and the other way around. but for lack of a better example if there were 2 functions 1 as DDT one as SDK, when would the ERROR get reset?
DDT and SDK Fake Function DivideByZero
For either side, I know if you code correctly you can find the cause of the error, but wonder when it gets reset? (Only when I do it? or a function does it just like if I did it?, or 1 line after?)
Sounds like a chicken-egg thing but hopefully someone gets what I am trying to figure out.
Also the line "ON ERROR" do yadda yadda, if I read right somewhere in the Win32 help files would be like checking if value = error value then do yadda yadda, so forgive my VB Refugee mind, but does PB catch an error that was caused by a call to a API function? (It appears it does in most cases, but wondered if that was for simplicity sake? or deeper?) Since I think if I wanted to say "ON VALUE = %TRUE GOTO" kind of thought.
Rather rough description, but if need I will see if I can figure out a sample to demo where I am confused.
for this question think of DDT = PB Functions, and SDK = API Functions
If an error occurs does that error code only exist until another function sets or resets that value? or is it only good for the next line of code?
I understand that I can not call a DDT style function and expect a API style check for error can not work (or report incorrectly) and the other way around. but for lack of a better example if there were 2 functions 1 as DDT one as SDK, when would the ERROR get reset?
DDT and SDK Fake Function DivideByZero
Code:
'5 divide by 0 'Should raise error 'results times 12 'Error Still Exist? 'pass to another function to multiply by 10 'Error still exist? or reset to 0 because I left this function? or only reset if the other function purposely reset the error value?
Sounds like a chicken-egg thing but hopefully someone gets what I am trying to figure out.
Also the line "ON ERROR" do yadda yadda, if I read right somewhere in the Win32 help files would be like checking if value = error value then do yadda yadda, so forgive my VB Refugee mind, but does PB catch an error that was caused by a call to a API function? (It appears it does in most cases, but wondered if that was for simplicity sake? or deeper?) Since I think if I wanted to say "ON VALUE = %TRUE GOTO" kind of thought.
Rather rough description, but if need I will see if I can figure out a sample to demo where I am confused.
Comment