13.07.2015 Views

Turbo Basic

Turbo Basic

Turbo Basic

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

RESUME statementFunctionSyntaxRemarksExampleRESUME restarts execution after error handling.RESUME [{OINEXTI'abe'}]RESUME and RESUME 0 cause execution to resume at the statementthat caused the error.RESUME NEXT causes execution to resume with the statementdirectly following the one that caused the error.RESUME label causes execution to resume at the code identifiedby label.If a RESUME statement is encountered when the program isn'tin an error-trapping routine, then run-time error 20 results,Resume Without Error.Note: The ERL, RESUME, and RESUME NEXT statementscause the compiler to generate a 4-byte pointer for each statementin a program. Therefore, programmers concerned with the size oftheir generated code should take note. Using RESUME [Line #]generates a single jump instruction. ERL is normally used fordebugging purposes so it is probably of little concern.I set the error trapON ERROR GOTO ErrorHandlerI this statement causes a run-time errorII = LOG(-l)PRINT "The error was trappedENDErrorHandler:PRINT "Error" ERR " at " ERLRESUME NEXT<strong>Turbo</strong> <strong>Basic</strong> Reference Directory 325

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!