Re: Does this string processing work for you?



Before this topic ends, I want to show a alternate method.
Below is also a easy 2 statement solution using a count_items function that
handles comma,blank item separators, and I just modified my existing 1
statement count_items function to handle commas along with blanks.

include "strings.f90" !
http://home.earthlink.net/~dave_gemini/strings.f90
! -------------------
program process_string
use string_functions
character(200) :: s = '1,2,3, 4 5 6 7, 8 9,10'
integer :: v(100), n

n = Count_Items(s)
read (s,*) v(1:n)
write (*,'(999i3)') v(1:n) ! = 1 2 3 4 5 6 7 8 9 10

end program


.