OS/2 Procedures Language 2/REXX


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


COMPARE




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

COMPARE returns 0 if the strings, string1 and string2, are identical. 
Otherwise, COMPARE returns the position of the first character that does 
not match. The shorter string is padded on the right with pad if 
necessary.  The default pad character is a blank. 
Here are some examples: 

COMPARE('abc','abc')         ->    0
COMPARE('abc','ak')          ->    2
COMPARE('ab ','ab')          ->    0
COMPARE('ab ','ab',' ')      ->    0
COMPARE('ab ','ab','x')      ->    3
COMPARE('ab-- ','ab','-')    ->    5
  

Inf-HTML End Run - Successful