mednml
C MEDNML SOURCE OF166741 23/10/16 21:15:05 11755 IMPLICIT INTEGER(i-n) IMPLICIT REAL*8(a-h,o-z) CHARACTER*(*) STRING1 CHARACTER*(*) STRING2 c* string3 doit avoir la meme longueur que STRING2... c* soit MED_NAME_SIZE = 64 c* CHARACTER*(MED_NAME_SIZE) string3 CHARACTER*(64) string3 CHARACTER*(1) str1 EXTERNAL LONG SEGMENT SLISPT c* CHARACTER*(MED_NAME_SIZE) LISPOI(ipoi) CHARACTER*(64) LISPOI(ipoi) ENDSEGMENT str1 = '.' STRING2 = ' ' ISCAN = 0 SLISPT = 0 IF ((INUM1 .EQ. 0) .OR. (INUM2 .EQ. 0)) RETURN IF (ilon .EQ. 0) RETURN ISCAN = INDEX(STRING1,str1,BACK=.TRUE.) IF (ISCAN .EQ. 0) RETURN IF (INUM1 .EQ. -1) THEN STRING2 = STRING1(ISCAN+1:ilon) RETURN ENDIF IF (INUM1 .EQ. -2) THEN STRING2 = STRING1(1:ISCAN-1) RETURN ENDIF ipoi = ilon SEGINI,SLISPT string3 = STRING1 ic = 0 DO ia = 1, ilon is1 = INDEX(string3,str1) IF (is1 .GT. 0) THEN ic = ic + 1 SLISPT.LISPOI(ic) = string3(1:is1-1) string3 = string3(is1+1:) ELSE ic = ic + 1 SLISPT.LISPOI(ic) = string3 GOTO 1 ENDIF ENDDO 1 CONTINUE ia = INUM1 ib = INUM2 IF (ia .LT. 0) THEN ia = ia + ic + 1 ENDIF IF (ib .LT. 0) THEN ib = ib + ic + 1 ENDIF IF ((ia.LE.0).OR.(ib.LE.0).OR.(ia.GT.ib).OR.(ib.GT.ic)) THEN ISCAN = 0 GOTO 99 ENDIF STRING2 = SLISPT.LISPOI(ia) DO ic = ia+1, ib string3 = SLISPT.LISPOI(ic) STRING2 = STRING2(1:ilon2)//str1//string3(1:ilon1) ENDDO 99 continue SEGSUP,SLISPT c return END
© Cast3M 2003 - Tous droits réservés.
Mentions légales