Silverfrost Forums

Welcome to our forums

illegal character assignment

14 Mar 2007 11:55 #1804

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

14 Mar 2007 12:37 #1807

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.

28 Mar 2007 12:53 #1827

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

28 Mar 2007 3:27 #1828

Sorry paul I found the mistake I make all ready greating john

Please login to reply.