Navigation:  Reference > Functions By Category > Strings >

lStrBitSet()

Previous pageReturn to chapter overviewNext page

Check the status of a single bit from a character string and optionally set a new value.

Syntax:

lStrBitSet(@<cStr>,<nBitPos>,[<lNewSetting>]) -> lOldSetting

Parameters:

<cStr>

Binary string with the bits to check or set. If <lNewSetting> is provided this parameter must be passed by reference.

<nBitPos>

1 based position of the bit to check or set.

<lNewSetting>

Logical.If this parameter is provided the <nBitPos> bit will be switched on or off depending on the <lNewSetting> value.

Return Value:

Return the previous state of <nBitPos>