FUNCTION PUTBIT : DWORD
Sets a bit of a DWORD value
Example in ST:
var1 := 38; (* binär 100110 *)
var2 := PUTBIT(A,4,TRUE); (* Result: 54 = 2#110110 *)
var3 := PUTBIT(A,1,FALSE); (* Result: 36 = 2#100100 *)
InOut:
Scope |
Name |
Type |
Comment |
Return |
PUTBIT |
DWORD |
Value with the changed bit |
Input |
X |
DWORD |
Value to be manipulated |
N |
BYTE |
Position of the bit to be changed, starting with 0 |
|
B |
BOOL |
Value of specified bit |