Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 subroutine plstrf2c(string1, string2, maxlen)
00022
00023 integer*4 maxlen
00024 character*(*) string1, string2
00025
00026 integer*4 limit, islen
00027 external islen
00028
00029 limit = min0(islen(string1),maxlen-1)
00030 do 100 i = 1,limit
00031 string2(i:i) = string1(i:i)
00032 100 continue
00033 string2(limit+1:limit+1) = char(0)
00034
00035 return
00036 end subroutine plstrf2c
00037
00038
00039 subroutine plstrc2f(string1, string2)
00040
00041 character*(*) string1, string2
00042
00043 integer*4 limit
00044 character*300 stringbuf
00045
00046 limit = 1
00047 10 if (ichar(string1(limit:limit)) .eq. 0) goto 20
00048 stringbuf(limit:limit) = string1(limit:limit)
00049 limit = limit + 1
00050 goto 10
00051
00052 20 if(limit.gt.1) then
00053 string2 = stringbuf(1:limit-1)
00054 else
00055 string2 = ''
00056 endif
00057
00058 return
00059 end subroutine plstrc2f
00060
00061
00062 integer function islen(string)
00063 character*(*) string
00064 integer i
00065
00066 do 100 i = len(string),1,-1
00067 if (string(i:i) .ne. ' ') then
00068 islen = i
00069 return
00070 endif
00071 100 continue
00072
00073 if(len(string).eq.0) then
00074
00075 islen = 0
00076 else
00077
00078 islen = 1
00079 endif
00080 return
00081 end function islen