COSMOS v7.655  COSMOSv7655
(AirShowerMC)
ksplit.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine ksplit (a, m, n, b, nr)
 

Function/Subroutine Documentation

◆ ksplit()

subroutine ksplit ( character*(*)  a,
integer  m,
integer  n,
character*(*), dimension(n b,
integer  nr 
)

Definition at line 2 of file ksplit.f.

Referenced by __add2nrfai.f__(), __checknrfai.f__(), __mknrfai.f__(), __mknrfaifromdat.f__(), __randomsel.f__(), __ranseeascii.f__(), __reanal.f__(), __reduceeachsize.bin.f__(), __reduceeachsize.binbyl.f__(), __reduceeachsize.f__(), __reducesize.f__(), __seeascii.f__(), __select.f__(), __smashskel.f__(), __smashskelsmallfileno.f__(), __smashskeltrial.f__(), checkenergy(), and checkptcls().

2  implicit none
3  character*(*) a ! input. e.g abc xyz xxkxkxkk
4  integer m ! input. max characters containable in b(i)
5  integer n ! input. array size of b
6  character*(*) b(n) ! output. field value of i=1,2,...nr
7  integer nr ! output. nr field is obtained
8 
9  integer klena, tl, bp, i, nc
10  character*1 prev
11 
12  tl = klena(a)
13 
14  nr = 0
15  prev = ' '
16  do i = 1, tl
17  if( a(i:i) .eq. ' ' ) then
18  prev = ' '
19  else
20  if(prev .eq. ' ') then
21  if(nr .ge. n) return !!!!
22  nr = nr + 1
23  nc = 0
24  prev = 'x'
25  endif
26  nc = nc + 1
27  if(nc .eq. 1) b(nr) = ' '
28  if(nc .le. m) then
29  b(nr)(nc:nc) = a(i:i)
30  endif
31  endif
32  enddo
nodes i
block data include Zlatfit h c fitting region data data data data data d0 data data d0 data data m
Definition: ZlatfitBD.h:35
integer function klena(cha)
Definition: klena.f:20
real(4), save a
Definition: cNRLAtmos.f:20
real(4), save b
Definition: cNRLAtmos.f:21
real cut integer nc
Definition: Zprivate.h:1
integer n
Definition: Zcinippxc.h:1
Here is the caller graph for this function: