Télécharger mednml.eso

Retour à la liste

Numérotation des lignes :

  1. C MEDNML SOURCE CB215821 18/02/07 21:15:06 9736
  2. SUBROUTINE MEDNML(INUM1, INUM2, STRING1, STRING2, ISCAN)
  3. IMPLICIT INTEGER(i-n)
  4. IMPLICIT REAL*8(a-h,o-z)
  5.  
  6. CHARACTER*(*) STRING1
  7. CHARACTER*(*) STRING2
  8. CHARACTER*64 string3
  9. CHARACTER*1 str1
  10. EXTERNAL LONG
  11.  
  12. SEGMENT SLISPT
  13. CHARACTER*64 LISPOI(ipoi)
  14. ENDSEGMENT
  15.  
  16. ilon = LONG(STRING1)
  17. ISCAN = 0
  18. STRING2 = ' '
  19. IF ((ilon .EQ. 0) .OR. (INUM1 .EQ. 0) .OR. (INUM2 .EQ. 0)) THEN
  20. RETURN
  21. ENDIF
  22. ISCAN = INDEX(STRING1,'.',BACK=.TRUE.)
  23. IF (ISCAN .EQ. 0) THEN
  24. RETURN
  25. ENDIF
  26.  
  27. IF (INUM1 .EQ. -1) THEN
  28. STRING2 = STRING1(ISCAN+1:ilon)
  29. ISCAN = LONG(STRING2)
  30. RETURN
  31. ENDIF
  32. IF (INUM1 .EQ. -2) THEN
  33. STRING2 = STRING1(1:ISCAN-1)
  34. ISCAN = LONG(STRING2)
  35. RETURN
  36. ENDIF
  37.  
  38. ic = 0
  39. ipoi = ilon
  40. string3 = STRING1
  41. SEGINI SLISPT
  42. DO ia=1,ilon
  43. is1 = INDEX(string3,'.')
  44. IF (is1 .GT. 0) THEN
  45. ic = ic + 1
  46. SLISPT.LISPOI(ic) = string3(1:is1-1)
  47. string3 = string3(is1+1:)
  48. ELSE
  49. ic = ic + 1
  50. SLISPT.LISPOI(ic) = string3
  51. GOTO 1
  52. ENDIF
  53. ENDDO
  54. 1 CONTINUE
  55.  
  56. ia = INUM1
  57. ib = INUM2
  58. IF (ia .LT. 0) THEN
  59. ia = ia + ic + 1
  60. ENDIF
  61. IF (ib .LT. 0) THEN
  62. ib = ib + ic + 1
  63. ENDIF
  64. IF ((ia.LE.0).OR.(ib.LE.0).OR.(ia.GT.ib).OR.(ib.GT.ic)) THEN
  65. ISCAN = 0
  66. RETURN
  67. ENDIF
  68.  
  69. STRING2 = SLISPT.LISPOI(ia)
  70. DO ic=ia+1,ib
  71. string3 = SLISPT.LISPOI(ic)
  72. ilon1 = LONG(string3)
  73. ilon2 = LONG(STRING2)
  74. STRING2 = STRING2(1:ilon2)//'.'//string3(1:ilon1)
  75. ENDDO
  76. ISCAN = LONG(STRING2)
  77. SEGSUP SLISPT
  78.  
  79. RETURN
  80. END
  81.  
  82.  
  83.  

© Cast3M 2003 - Tous droits réservés.
Mentions légales