Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site dalcs.UUCP Path: utzoo!utcsri!dalcs!b2 From: b2@dalcs.UUCP (Bert Buckley) Newsgroups: net.micro.pc,net.lang.f77 Subject: Re: stupid problem in fortran Message-ID: <1497@dalcs.UUCP> Date: Mon, 29-Apr-85 11:06:58 EDT Article-I.D.: dalcs.1497 Posted: Mon Apr 29 11:06:58 1985 Date-Received: Tue, 30-Apr-85 00:42:42 EDT References: <370@sdchema.UUCP> <614@utcs.UUCP> <5318@tektronix.UUCP> Organization: Dalhousie University, Halifax, N.S., Canada Lines: 37 > This is in response to the fact that statements like: > > var = 'x' // var > > generally don't work as expected. > I have two comments. First, when the discussion relates to f77 on Unix, I am never surprised when there is a failure to conform to the standard, and therefore would not be surprised by anything that f77 did to this statement. But, of more relevance is what is supposed to happen within the standard. As has been pointed out in another article, overlapping string assignments are not permitted within the 1977 standard. This question is however being considered by the Fortran Committee of ANSI, namely X3J3, but in a much broader context. Fortran 8x contains proposals for whole array operations and array sectioning. There is also a statement that says roughly that in the event of overlapping assignments (either for arrays or for strings or substrings), the effect is that of evaluation of the right hand side followed by assignment to the left. This is wonderful in prin- ciple, but it does not take a lot of effort to figure out that within subroutines this could have rather large implications, i.e. either that the compiler write opts for execution efficiency and ignores the possibility of overlap, or that he conform to the standard, implements all operations using temporary arrays or strings, and generates programs that grind along forever. The Canadian Fortran Standards Committee has been following the F8x proposals quite closely and has written to X3J3 and the Inter- national Fortran Standards Committee (ISO/TC97/SC22/WG5) expressing a number of concerns about proposals for F8x. Anyone wishing a copy of this report is welcome to one by sending me mail with a UUCP or ARPANET address; I will respond with a copy in TeX source form (which is reasonably readable without processing it with TeX).