silvert@cs.dal.ca (Bill Silvert) (02/14/91)
In article <2PWGG2@MPLVAX.SRI.COM> HUESTIS@MPLVAX.SRI.COM (David L. Huestis) writes: >Under Microsoft FORTRAN the following simple program > > character string*4/'abc'/ > string = '*'//string > write(*,*)string > end > >produces the output '**bb' while LAHEY and VAX yield '*abc' > >Microsoft FORTRAN takes no precautions against the source strings >overlapping the destination string. It doesn't have to. The standard (10.4) states that you cannot reference the string you are defining on the rhs. I suspect that compilers that handle > string = '*'//string correctly will not give the correct result for > string = string//'*' -- 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