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.

WRITEWRITE without an ArgumentWRITE without an argument lists the names and values of all defined variables in the localenvironment. It presents these variables as follows:varname1=value1varname2=value2Note that an argumentless WRITE automatically provides formatting to separate the listedvariables. It lists string values enclosed in double quotation marks.A postconditional expression can be specified with an argumentless WRITE. An argumentlessWRITE must be separated by at least two blank spaces from a command following it on thesame line.WRITE with ArgumentsWRITE expression displays the sequence of characters identified by the expression.Expression can evaluate to a number or a quoted string.WRITE *integer-expression displays the character represented by the integer expression.A WRITE command can take any combination of expression, *integer-expression, and farguments. WRITE arguments are separated by commas.You must use the f argument and blank spaces within strings to provide any desired outputformatting; WRITE with arguments provides no automatic formatting to separate argumentvalues or indicate strings. For example:WRITE "numbers",1,2,3WRITE "letters","ABC"displays as numbers123lettersABC.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). You can specify a postconditionalexpression for an argumentless WRITE or a WRITE with arguments. For furtherdetails, refer to Command Postconditional Expressions in Using <strong>Caché</strong> <strong>ObjectScript</strong>.<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 161

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

Saved successfully!

Ooh no, something went wrong!