hi guys ,

i am reviewing some old code and updating stucture

I have a need to do a gosub that has a number of program error checks in it

the gosub is called from many places in code to check if the fuction is allowed depending on the hardware status which is read in the error check sub

if no errors are found with the hardware test groups selected in the error check routine then returns to the called section

How ever if it finds an error then it has a direct goto to the service subs and commands branch off to deal with the required error condition , never returning to the orginal routine

this then breaks out of the orginal "return" to calling sub

it not great to do but i can see any way to avoid this , in the structure , and ii know after gosub , a return not done can cause issues

i can avoid the " return " by putting in a series ofg flag so it knows where it was orginally called from but that not a really practical and like to avoid

what i am i forgetting or better way to aproach this