Rexx - Extended Functions bitclr



This function is used to toggle the specified bit in the binary string to 0.

Syntax

bitclr(binstring,position) 

Parameters

  • binstring − The input binary string.

  • position − The position in the binary string to which the bit needs to be set to 0.

Return Value

The function will return the new value of the binary string with the positional bit set to 0.

Example

/* Main program */ 
options arexx_bifs 
say c2x(bitclr('0414'x,4)) 

In the above program, in order to display the bit string, the function c2x is used to convert the bit string to a character based representation which can be seen in the console window.

Output

0404
rexx_extended_functions.htm
Advertisements