Does this string processing work for you?



Below works on CVF because:
1. it terminates list input when it encounters a null char during the read.
2. it makes available the list index count on error exit

So does below work on your non-CVF system?
If it does, it represents the simplest/shortest method yet shown to process
unknown integer items from file record.

I posted below over in comp.lang.pl1 in rebuttal to some horrific PL/I
string-handling code thats currently being discussed and in reply to a
comp.lang.fortran regular, Glen Hermansfeldt's un-substantiated claim " PL/I
has better string-handling than Fortran"

! -------------------
program process_string ! thats input from file record?
character(200) :: s = '1,2,3,4,5,6,7'
integer :: v(100), n

s(len_trim(s)+1:) = ' ' // char(0) ! conv to cstring

read (s,*,err=1) (v(n),n=1,size(v))
1 write (*,'(999i3)') n, v(1:n-1) ! = 8 1 2 3 4 5 6 7
end program


.