Tivoli Service Desk 6.0 Developer's Toolkit Script Language Reference
Return to Main Page
Performs a bitwise AND operation on two or more integer expressions and returns the result.
FUNCTION BitAnd (VAL bits: INTEGER ...): INTEGER;
Argument Name | Description |
bits | An integer expression |
IF BitAnd(winStyle, $WinTitle) <> 0 THEN -- The window style calls for a title bar. ... END;
Returns the bitwise inverse of the argument.
FUNCTION BitNot (VAL bits: INTEGER): INTEGER;
Argument Name | Description |
bits | An integer of single bit values |
BitNot changes every bit in its argument to its binary inverse: 0 becomes 1 and 1 becomes 0.
WinCreate($Desktop, myWindow, MyHandler, 10, 10, 80, 25, 'Example', BitAnd($WinDefaultStyle, BitNot ($WinSysMenu))); -- myWindow is created with the all of the default window -- styles except that it has no system menu.
Performs a bitwise OR operation on two or more integer expressions and returns the result.
FUNCTION BitOr (VAL bits: INTEGER ...): INTEGER;
Argument Name | Description |
bits | An integer expression whose bits are to be combined with those in other expressions by using an OR operator. |
answer := WinMessageBox($Desktop, 'Error', BitOr($MBIconError, $MBAbortRetryIgnore, $MBDefButton2, $MBMoveable), 'Operation Failed');
Performs a bitwise exclusive Or (XOR) operation on the input integer expressions and returns the result. An exclusive Or operation returns 1 if the operands are different.
FUNCTION BitXOr (VAL bits: INTEGER ...): INTEGER;
Argument Name | Description |
bits | An integer expression whose bits are to be combined with those of other integer expressions, using an XOR operator. |
PROCEDURE EncryptText (REF text: LIST OF STRING, VAL mask: INTEGER) IS (* Encrypt the given text by XORing the mask over each character. While not very secure, it is simple and has the advantage that decryption is accomplished by calling EncryptText again with the same mask.*) VARIABLES i: INTEGER; ACTIONS FOR text DO FOR i := 1 TO StrLength(text[$CURRENT]) DO text[$CURRENT][i] := Char(BitXOr(CharCode(text[$CURRENT][i]), mask)); END; END; END;
Tivoli Service Desk 6.0 Developer's Toolkit Script Language Reference