Caché ObjectScript Reference
$ZBITSTR (legacy function)
[Back] [Next]
   
Server:docs2
Instance:LATEST
User:UnknownUser
 
-
Go to:
Search:    

Bitstring function – STRING.
Synopsis
$ZBITSTR(size,truthval)
Parameters
size Positive integer.
truthval Optional — Specifies a binary value (0 or 1) for the returned bits.
Description
This page describes the legacy function $ZBITSTR. It is described here for compatibility with legacy applications.
$ZBITSTR returns a bitstring whose length is size bits long, with all of its bits set to truthval.
Parameters
size
Positive integer. The integer must be in the range 1 to 262,128 bits (32766 x 8). It can be specified as a value, a variable, or an expression.
truthval
Specifies a binary value (0 or 1) for the returned bits. If truthval is 0, or is omitted, all the bits are set to 0 (OFF). If truthval is 1, all the bits are set to 1 (ON).
Example
The following example creates a bitstring named bs:
SET bs=$ZBITSTR(4,1)
If size=4 and truthval=1, then the result of $ZBITSTR would be a bitstring with the value [1,1,1,1].
See Also