Tivoli Service Desk 6.0 Developer's Toolkit Script Language Reference
Ritorna alla pagina principale
Esegue un'operazione AND bitwise su due o più espressioni numero intero e restituisce il risultato.
FUNCTION BitAnd (VAL bits: INTEGER ...): INTEGER;
Nome dell'argomento | Descrizione |
bits | Un'espressione numero intero |
IF BitAnd(winStyle, $WinTitle) <> 0 THEN -- The window style calls for a title bar. ... END;
Restituisce l'inverso bitwise dell'argomento.
FUNCTION BitNot (VAL bits: INTEGER): INTEGER;
Nome dell'argomento | Descrizione |
bits | Un numero intero di valori bit singolo |
BitNot modifica ogni bit nell'argomento a esso relativo per il suo inverso binario: 0 diventa 1 e 1 diventa 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.
Esegue un'operazione OR bitwise su due o più espressioni numero intero e restituisce il risultato.
FUNCTION BitOr (VAL bits: INTEGER ...): INTEGER;
Nome dell'argomento | Descrizione |
bits | Un'espressione numero intero i cui bit devono essere combinati con quelli in altre espressioni utilizzando un operatore OR. |
answer := WinMessageBox($Desktop, 'Error', BitOr($MBIconError, $MBAbortRetryIgnore, $MBDefButton2, $MBMoveable), 'Operation Failed');
Esegue un'operazione bitwise XOR (exclusive Or) sulle espressioni numero intero di immissione e restituisce il risultato. Un'operazione Or esclusiva restituisce 1 se gli operatori sono diversi.
FUNCTION BitXOr (VAL bits: INTEGER ...): INTEGER;
Nome dell'argomento | Descrizione |
bits | Un'espressione numero intero i cui bit devono essere combinati con quelli di altre espressioni numero intero, utilizzando un operatore XOR. |
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