11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

DescriptionThe ZPRINT command displays lines of code from the currently loaded routine. The outputis sent to the current device. You establish the current device with the USE command. <strong>Caché</strong>maintains the current device ID in the $IO special variable.ZPRINT has two forms:• Without arguments• With argumentsZPRINT without arguments displays all the lines of code in the currently loaded routine.ZPRINT with arguments displays the specified lines of code. ZPRINT lineref1 displays theline specified by lineref1. ZPRINT lineref1:lineref2 displays the range of lines starting withlineref1 and ending with lineref2.ArgumentspcAn optional postconditional expression. <strong>Caché</strong> executes the command if the postconditionalexpression is true (evaluates to a non-zero numeric value). <strong>Caché</strong> does not execute the commandif the postconditional expression is false (evaluates to zero). For further details, referto Command Postconditional Expressions in Using <strong>Caché</strong> <strong>ObjectScript</strong>.lineref1The line to be printed or the first in a range of lines to be displayed or printed. Can be specifiedin either of the following forms: +offset where offset is a positive integer specifying the linenumber within the current routine. label[+offset] where label is a label within the routineand offset is the line number within the label. If you omit the offset option, <strong>Caché</strong> prints thefirst code line and the label. Note that with this form, offset actually evaluates to offset+1.For example, label+1 prints the second line within the label.lineref2The last line in a range of lines to be displayed or printed. Specify in the same way as lineref1.The preceding colon is required.NotesZPRINT Equivalent to PRINTThe ZPRINT command is the exact equivalent of the PRINT command.ZPRINT<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 401

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

Saved successfully!

Ooh no, something went wrong!