1
c Utilities working on strings
3
function fk88strnoeq(str1,str2)
4
c Returns true if str1#str2, false otherwise. The comparison
6
logical fk88strnoeq,flag
7
character * (*) str1,str2
8
character * 70 strin,tmp1,tmp2
11
call fk88low_to_upp(strin,tmp1)
13
call fk88low_to_upp(strin,tmp2)
24
subroutine fk88low_to_upp(strin,strout)
25
c Converts lowercase to uppercase
26
implicit real*8(a-h,o-z)
27
character*70 strin,strout,tmp
35
call fk88xgetchar1(ch,ch1)
40
call fk88xgetchar1(ch,ch1)
44
call fk88strcat(strout,ch1,tmp)
53
subroutine fk88xgetchar1(ch,ch1)
54
c Converts lowercase to uppercase (1 character only)
60
c ishift=difference between the ascii value of a and A
64
if(ic.ge.ia.and.ic.le.iz)then
73
subroutine fk88strnum(string,num)
74
c- writes the number num on the string string starting at the blank
75
c- following the last non-blank character
76
character * (*) string
81
dowhile(tmp(j:j).eq.' ')
84
ipos = ifk88istrl(string)
87
write(*,*)'error, string too short'
91
string(ipos+1:ito)=tmp(j:)
95
function ifk88istrl(string)
96
c returns the position of the last non-blank character in string
97
character * (*) string
99
dowhile(i.gt.0.and.string(i:i).eq.' ')
106
subroutine fk88strcat(str1,str2,str)
107
c concatenates str1 and str2 into str. Ignores trailing blanks of str1,str2
108
character *(*) str1,str2,str
113
write(*,*) 'error: l1+l2>l in fk88strcat'
114
write(*,*) 'l1=',l1,' str1=',str1
115
write(*,*) 'l2=',l2,' str2=',str2
119
if(l1.ne.0) str(1:l1)=str1(1:l1)
120
if(l2.ne.0) str(l1+1:l1+l2)=str2(1:l2)
121
if(l1+l2+1.le.l) str(l1+l2+1:l)= ' '