
Manual – IPOSplus®
209
17
Standard functions
Compiler – Functions
17.3.2 _BitClear
Syntax
_BitClear( H, bit )
Description
_BitClear sets the bit within variable H to zero.
Key points
H
Variable name
bit
Constant expression for bit position
Example
main()
{
_BitClear( H100, 3 ); // deletes bit 3 in H100
}
17.3.3 _BitMove
Syntax
_BitMove( H2 , bit2, H1, bit1 )
Description
Copies the bit with the number bit1 in IPOS
plus®
variable H1 to the bit with the number
bit2 in IPOS
plus®
variable h2. All bits of H1 and all other bits of H2 remain unchanged.
The bit positions of a variable are numbered 0 to 31. The least significant bit has the
number 0.
Key points
h2
Name of the target variable
bit2
Number of the target bit
h1
Name of the source variable
bit1
Number of the source bit
Example
main()
{
_BitMove( H1, 3,H2, 4 ); // copies H1.3 = H2.4
_BitMove( H1, 1,H1, 0 ); // copies H1.1 = H1.0
}
17.3.4 _BitMoveNeg
Syntax
_BitMoveNeg( H2 , bit2, H1, bit1 )
Description
Copies the bit with the number bit1 in IPOS
plus®
variable H1 to the bit with the number
bit2 in IPOS
plus®
variable H2. The bit is negated during this process. All bits of H1 and
all other bits of H2 remain unchanged. The bit positions of a variable are numbered 0 to
31. The least significant bit has the number 0.
Key points
h2
Name of the target variable
bit2
Number of the target bit
h1
Name of the source variable
bit1
Number of the source bit
P
i
f
kVA
Hz
n
P
i
f
kVA
Hz
n