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.

<strong>Caché</strong> <strong>ObjectScript</strong> Commands• With an argumentPRINT without an argument prints all the lines of code in the currently-loaded routine.PRINT with an argument prints the lines from the currently-loaded routine that you specifyin the argument. PRINT lineref1 prints a single specified line of code (lineref1). PRINTlineref1:lineref2 prints the range of lines that starts with lineref1 and ends with lineref2.ArgumentspcAn optional postconditional expression. <strong>Caché</strong> executes the PRINT command if the postconditionalexpression is true (evaluates to a non-zero numeric value). <strong>Caché</strong> does not executethe command if the postconditional expression is false (evaluates to zero). For further details,refer to Command Postconditional Expressions in Using <strong>Caché</strong> <strong>ObjectScript</strong>.lineref1A line to be printed. It can be specified in either of the following forms:+offsetlabel [+offset]offset is a positive integer specifying the line number withinthe current routine.label is a label within the routine and offset is the line numberwithin the label. If you omit offset, <strong>Caché</strong> prints the first codeline and the label. With this form, offset actually evaluates tooffset+1. For example, label+1 prints the second line withinthe label.lineref2The last line in a range of lines to be printed. Specified the same as lineref1. The precedingcolon is required.ExamplesThis example prints the sixth line in the currently-loaded routine.PRINT +6This example prints the third through eighth lines.PRINT +3+8108 <strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong>

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

Saved successfully!

Ooh no, something went wrong!