OS/2 Procedures Language 2/REXX


Inf-HTML [About][Toc][Index] 0.9b (c) 1995 Peter Childs


BITAND




 >>--BITAND(string1-+-----------------------+-)------><
                    +-,-+--------+-+------+-+
                        +-string2+ +-,pad-+

BITAND returns a string composed of the two input strings logically 
compared, bit by bit, using the AND operator. The length of the result is 
the length of the longer of the two strings. If no pad character is 
provided, the AND operation terminates when the shorter of the two strings 
is exhausted, and the unprocessed portion of the longer string is appended 
to the partial result.  If pad is provided, it is used to extend the 
shorter of the two strings on the right, before carrying out the logical 
operation. The default for string2 is the zero length (null) string. 
Here are some examples: 

BITAND('73'x,'27'x)            ->    '23'x
BITAND('13'x,'5555'x)          ->    '1155'x
BITAND('13'x,'5555'x,'74'x)    ->    '1154'x
BITAND('pQrS',,'DF'x)          ->    'PQRS' /* ASCII only  */
  

Inf-HTML End Run - Successful