INTEGER FUNCTION ISCOMP( STR1 , STR2 ) C*********************************************************************** C C Description : Compares two strings after padding them when necessary C with spaces until they are of equal length. C C Arguments : STR1 = BYTE array containing 1st string to compare C STR2 = BYTE array containing 2nd string to compare C Funval = -n if STR1 < STR2 C 0 if STR1 = STR2 C +n if STR1 > STR2 C where n is the 1st position at which they C do not match C C Author : T.Pijl C AKZO PHARMA, Oss Holland C dep. SDA C C Version : V1.0 Date : 14-dec-82 C C Module name : ISCOMP.FTN C C Package : RSX-LIBRARY C C Compilation/ C taskbuilding : FOR/F4P/TR:NONE ISCOMP C C Updates : name version C C description : C C************************************************************************ BYTE STR1(1),STR2(1),HV1,HV2 C IL1=LEN(STR1) IL2=LEN(STR2) ISCOMP=0 DO 10 I=1,MAX0(IL1,IL2) HV1=STR1(I) IF( I .GT. IL1 ) HV1=32 HV2=STR2(I) IF( I .GT. IL2 ) HV2=32 IF( HV1 .NE. HV2 ) 11,10,10 C THEN 11 ISCOMP=I IF( HV1 .LT. HV2 ) ISCOMP=-I GOTO 90 C ENDIF 10 CONTINUE 90 RETURN END