- Code: Select all Expand view
cBits := "001110110"
? Chr(AscPos( 3 ) ) // --> "1" : Character at 3rd position
// Now set character at 2nd position to "1"
cBits := PosChar( cBits, "1", 2 )
? cBits // "011110110"
cBits := "001110110"
? Chr(AscPos( 3 ) ) // --> "1" : Character at 3rd position
// Now set character at 2nd position to "1"
cBits := PosChar( cBits, "1", 2 )
? cBits // "011110110"