From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24522 invoked by alias); 5 Sep 2007 00:35:43 -0000 Received: (qmail 24508 invoked by uid 22791); 5 Sep 2007 00:35:42 -0000 X-Spam-Check-By: sourceware.org Received: from vms048pub.verizon.net (HELO vms048pub.verizon.net) (206.46.252.48) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 05 Sep 2007 00:35:36 +0000 Received: from [192.168.1.5] ([71.115.219.45]) by vms048.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JNV00JXSDMVRVZ0@vms048.mailsrvcs.net>; Tue, 04 Sep 2007 19:35:21 -0500 (CDT) Date: Wed, 05 Sep 2007 00:35:00 -0000 From: Jerry DeLisle Subject: Re: [patch, libfortran] PR33253 namelist: reading back a string with apostrophe In-reply-to: <46DD28A3.9020601@net-b.de> To: Tobias Burnus Cc: Fortran List , gcc-patches Message-id: <46DDF97E.8010403@verizon.net> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit References: <46DC598F.50905@verizon.net> <46DD28A3.9020601@net-b.de> User-Agent: Thunderbird 1.5.0.12 (X11/20070719) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-09/txt/msg00294.txt.bz2 Tobias Burnus wrote: > Hi Jerry, > > Jerry DeLisle wrote: >> The title of this PR is a bit misleading. The failure occurs with a >> string without the apostrophe as well. The problem here is that when >> reading a string, we look at the first character and see if it is a >> delimiter ' or " . If not we would skip out and not read the rest of >> the string. > > For me, it does not fully work yet. Using the following program: > -------------------- > program main > implicit none > character(len=3) :: a > namelist /foo/ a > open(10,delim="APOSTROPHE") > a = "a'a" > write(10,foo) > write (*,foo) > rewind 10 > read (10,foo) > end program main > -------------------- > > ifort, NAG f95, g95, openf95 write all (modulo spacing): > > &FOO > A = 'a''a' > / > > gfortran writes: > > &FOO > A='a'a', / > > and has then problems reading this back: > Fortran runtime error: Invalid string input in item 0 > > (As gfortran properly reads A='a''a' this seems to be only a writing > and not a reading problem.) > > Tobias > Ok, I will will see what I can do here. Jerry