Path: utzoo!attcan!uunet!cs.dal.ca!silvert From: silvert@cs.dal.ca (Bill Silvert) Newsgroups: comp.lang.fortran Subject: concatenated strings Message-ID: <1990May31.125821.5995@cs.dal.ca> Date: 31 May 90 12:58:21 GMT Organization: Habitat Ecology Div., Bedford Inst. of Oceanography Lines: 18 I just tracked down a bug that seems to arise only with MS Fortran (I'm using ver. 5.0). When passing a complicated string involving the concatenation of several substrings to a subroutine, all is OK the first time through, but on the second call the program crashes. I think the code is legal, although complex. No problems of this sort arise on the two Unix compilers I have tried. I solved the problem by setting a string variable to the complex string and then passing the string variable to the subroutine. No, the problem does not arise from assigning part of a string to itself. I avoided that common bug. -- William Silvert, Habitat Ecology Division, Bedford Inst. of Oceanography P. O. Box 1006, Dartmouth, Nova Scotia, CANADA B2Y 4A2. Tel. (902)426-1577 UUCP=..!{uunet|watmath}!dalcs!biomel!bill BITNET=bill%biomel%dalcs@dalac InterNet=bill%biomel@cs.dal.ca