Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!masscomp!danny From: danny@masscomp.UUCP Newsgroups: comp.lang.fortran Subject: Re: Problem with substrings Message-ID: <1812@masscomp.UUCP> Date: Thu, 4-Jun-87 12:26:33 EDT Article-I.D.: masscomp.1812 Posted: Thu Jun 4 12:26:33 1987 Date-Received: Sat, 6-Jun-87 09:36:24 EDT References: <286@nikhefh.UUCP> Reply-To: danny@masscomp.UUCP (Daniel Pearl) Distribution: na Organization: MASSCOMP - Westford, Mass. (USA) Lines: 22 In article <286@nikhefh.UUCP> i91@nikhefh.UUCP (Fons Rademakers) writes: >Does somebody know what according to the FORTRAN 77 standard >should happen in the following substring expression: > > CHARACTER*10 CH, STR > > STR = 'ABCDEFGHIJ' > I = 6 > NC = 0 > CH = 'FOO'//STR(I:I+NC-1)//'BAR' Some compilers have extended to allow "null substrings"; they are sometimes useful. Often, a null substring is denoted by STR(start:finish) where the value of the finish expression is start-1. Another implementation might say that if finish