Rexx - Extended Functions bitcomp


Advertisements

This function is used to compare 2 binary strings starting with bit 0.

Syntax

bitcomp(binstring1, binstring2) 

Parameters

  • binstring1, binstring2 − The binary strings which need to be compared.

Return Value

This function returns the bit number of the first bit by which the two strings differ. Else if the two strings are identical, it will return -1.

Example

/* Main program */ 
options arexx_bifs 
say bitcomp('ee'x, 'fe',x) 

When we run the above program we will get the following result.

Output

0
rexx_extended_functions.htm
Advertisements