COSMOS v7.655
COSMOSv7655
(AirShowerMC)
kseblk.f
Go to the documentation of this file.
1
! ************************************************************
2
! *
3
! * kseblk: supress extra blanks
4
! * and replace specified character by blank
5
! *
6
! *********************** tested 87.01.29 ***************k.k**
7
!
8
! /usage/ call kseblk(text, c, lc)
9
!
10
! input text: character string
11
! c: one character to be replaced to blank
12
! output
13
! text: character string. first blank is supressed and
14
! then c is replaced to blank.
15
! lc: resultant text length
16
!
17
subroutine
kseblk
(text, c, lc)
18
implicit none
19
integer
lc
20
!
21
character*(*)
text
22
character*1
c
23
24
integer
klena, l, i, lg
25
!
26
l=klena(text)
27
lc=0
28
do
i=1, l
29
if
(text(i:i) .ne.
' '
)
then
30
lc=lc+1
31
if
(text(i:i) .eq. c)
then
32
text(lc:lc)=
' '
33
else
34
text(lc:lc)=text(i:i)
35
endif
36
endif
37
enddo
38
lg=len(text)
39
if
(lg .gt. lc)
then
40
text(lc+1:lg)=
' '
41
endif
42
end
kseblk
subroutine kseblk(text, c, lc)
Definition:
kseblk.f:18
KKlib
kseblk.f
Generated by
1.8.13