I am trying to take an old fortran code and re-compile it. But get this message from the compiler by ' string(1:ns)=string(k1:k2) ' how can I overcome this problem? Thanks john
illegal character assignment
Chances are you need to copy to a temporary string first.
tmp=string(k1:k2) string(1:ns)=tmp
I think this is required by the Fortran Standard. The reason would be the potential overlap when k1 and/or k2 are in the range 1:ns.
Hallo Paul I changed to the code you suggested But get a error now Error C:\............. (105) '=' has incompatible operands What can I do now ?. I am a new on fortran
Sorry paul I found the mistake I make all ready greating john