program wr3 implicit none c one-purposse program to make a file list integer*4 n1,n2,i,fs,iargc,fe,j,dn character*80 s80,st,s2 if(iargc().ne.5)then write(6,500) 500 format(' Usage: wr2 s1 n1 n2 dn s2') stop endif call getarg(1,s80) call getarg(2,st) read(st,*)n1 call getarg(3,st) read(st,*)n2 call getarg(4,st) read(st,*)dn call getarg(5,s2) do 1 i=n1,n2,dn write(st,90)i 90 format(i80) st=s80(fs(s80):fe(s80))//st(fs(st):fe(st))//s2(fs(s2):fe(s2)) do 2 j=fs(st),fe(st) 2 write(6,601)st(j:j) 601 format(a1,$) write(6,*) 1 continue end function fs(s) implicit none character*(*) s integer*4 fs,istart do 2 istart=1,len(s) 2 if(s(istart:istart).ne.' ')goto 3 3 fs=istart return end function fe(s) implicit none character*(*) s integer*4 fe,istart do 2 istart=len(s),1,-1 2 if(s(istart:istart).ne.' ')goto 3 3 fe=istart return end