11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

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

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

GOTOtestgotoAWRITE !,"running A"DO BWRITE !,"back to A, all done"QUITBWRITE !,"running B"GOTO CWRITE !,"this line in B should never execute"QUITCWRITE !,"running C"QUITUsing GOTO with Code BlocksGOTO can be used to exit a code block, but not to enter a code block. If you use GOTOinside a FOR, IF, DO WHILE, or WHILE loop, you can go to a tag outside of all codeblocks, a tag within the current code block, or go from a nested code block to a tag in thecode block that encloses it. You cannot go from a code block to a tag within another codeblock, either an independent code block, or a code block nested within the current code block.For code examples, refer to the individual commands.A GOTO to a tag outside a code block terminates the loop. A GOTO to a tag within a codeblock does not terminate the loop. A GOTO from a nested code block to an enclosing codeblock terminates the inner (nested) loop, but not the outer loop.See Also• DO command• FOR command• IF command• DO WHILE command• WHILE command• BREAK command• QUIT command• $CASE function<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 49

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

Saved successfully!

Ooh no, something went wrong!