merritt@iris613.gsfc.nasa.gov (John H Merritt) (06/30/90)
Here's something that fails to produce correct output. When you use a temporary variable for c_ext (or the string), in the concatination statement, you get the correct result. program ch character c_ext*16, filename*7 filename = 'FOO.BAR' c_ext = '.2' c_ext = filename // c_ext print*,'c_ext:',c_ext stop end Produces: c_ext:FOO.BARFOO.BAR I remember a bug when using // to create a filename in an open statement. Is this the same bug? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ John H. Merritt # Yesterday I knew nothing, Applied Research Corporation # Today I know that. merritt@iris613.gsfc.nasa.gov #
calvin@dinkum.sgi.com (Calvin H. Vu) (07/03/90)
In article <2662@dftsrv.gsfc.nasa.gov> merritt@iris613.gsfc.nasa.gov (John H Merritt) writes: >Here's something that fails to produce correct output. >When you use a temporary variable for c_ext (or the string), >in the concatination statement, you get the correct result. > program ch > character c_ext*16, filename*7 > filename = 'FOO.BAR' > c_ext = '.2' > c_ext = filename // c_ext > print*,'c_ext:',c_ext > stop > end >Produces: > c_ext:FOO.BARFOO.BAR This has been fixed in the 3.2.1 maintenance release which should have been released a while ago. The code does not comply to ANSI statndard but we fixed the "bug" anyway. >I remember a bug when using // to create a filename in an open statement. >Is this the same bug? No, this is not the same. >~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >John H. Merritt # Yesterday I knew nothing, >Applied Research Corporation # Today I know that. >merritt@iris613.gsfc.nasa.gov # - calvin ----------------------------------------------------------------------------- Calvin H. Vu | "We are each of us angels with only one Silicon Graphics Computer Systems | wing. And we can only fly embracing calvin@sgi.com (415) 962-3679 | each other."