Caché ObjectScript Reference
Displays the values of variables or expressions.
||Optional A postconditional expression.
||An expression whose value is to be displayed. May be a variable or an expression, or a comma-separated list of variables or expressions.
displays a numeric value as a canonical number
displays a string that contains a number in canonical form as a canonical number (rather than as a string). ZZWRITE
displays all other numeric and non-numeric strings as a quoted string. This is shown in the following example:
displays a list as a $lb ($LISTBUILD
) construct, rather than displaying the resulting encoded list string. This is shown in the following example:
ZZWRITE with an Object Reference
If the ZZWRITE
argument is an object reference, ZZWRITE
displays all of the attributes of the object, one attribute per line. The display format is the same as the %SYSTEM.OBJ.Dump()
method. If the object reference is an array, ZZWRITE
displays only the attributes of the top-level node; it does not display the subnode attributes.
This is shown in the following examples:
SET tStatement = ##class(%SQL.Statement).%New()
This behavior is the same as ZWRITE
If the ZZWRITE expr
argument is a Caché compressed bitstring (created using the $BIT
displays the decimal representation of the compressed binary string as $ZWCHAR
($zwc) two-byte (wide) characters.
also displays a comment that lists the uncompressed 1 bits in left-to-right order as a comma-separated list. If there are three or more consecutive 1 bits, it lists them as a range (inclusive) with two dot syntax (n..m
). For example, the bitstring [1,0,1,1,1,1,0,1] is shown as /*$bit(1,3..6,8)*/
. The bitstring [1,1,1,1,1,1,1,1] is shown as /*$bit(1..8)*/
. The bitstring [0,0,0,0,0,0,0,0] is shown as /*$bit()*/
The following example shows ZZWRITE
SET $BIT(a,1) = 0
SET $BIT(a,2) = 0
SET $BIT(a,3) = 1
SET $BIT(a,4) = 0
SET $BIT(a,5) = 1
SET $BIT(a,6) = 1
SET $BIT(a,7) = 1
SET $BIT(a,8) = 0
An optional postconditional expression. Caché executes the command if the postconditional expression is true (evaluates to a nonzero numeric value). Caché does not execute the command if the postconditional expression is false (evaluates to zero). For further details, refer to Command Postconditional Expressions
in Using Caché ObjectScript
An expression to evaluate, or a comma-separated list of expressions. An expr
can consist of, or contain local variables, process-private globals, global variables, or special variables. It cannot be a private variable. Variables can be subscripted. Expressions are evaluated in strict left-to-right order.
You can use extended global reference to specify a global variable not mapped to the current namespace. If you specify a nonexistent namespace, Caché issues a <NAMESPACE> error. If you specify a namespace for which you do not have privileges, Caché issues a <PROTECT> error, followed by the global name and database path, such as the following: <PROTECT> ^myglobal,c:\intersystems\cache\mgr\
. For further information on subscripted variables and extended global reference, refer to Global Structure
in Using Caché Globals