PUTBIT (FUN)¶
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
PUTBITDWORDValue with the changed bit
Input
XDWORDValue to be manipulated
NBYTEPosition of the bit to be changed, starting with 0
BBOOLValue of specified bit