[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-fortran
Subject:    Re: Problem with: read( unit=file, fmt=*, iostat=Read_Code) ( alphas(i), i = 1, 5 )
From:       Elzbieta Burnett <elzbieta.burnett () gmail ! com>
Date:       2012-12-28 9:58:10
Message-ID: CAASaBS_-uVNY+XCNaK6w97F6fGobU+06z_kqqjc7Xyvdm=q+Sg () mail ! gmail ! com
[Download RAW message or body]

I will wait.

Thanks, Ella

On Fri, Dec 28, 2012 at 4:52 AM, Tobias Burnus <burnus@net-b.de> wrote:
> Dear Ella,
>
> first, I do concur that the proper solution is to fix the compiler; that's
> what Jerry did by posting a patch (which still needs to be reviewed and
> committed). Thus, if you build GCC yourself, you can apply the patch and
> everything should work. If you don't want to build GCC yourself, you have to
> wait for the next binary build - either one which is linked on the GCC Wiki
> which should be a matter very few days or by Red Hat which will take longer.
> The only other possibilities (besides using a work around) are: to use a
> different compiler which doesn't have this bug - or to provide us with a
> time machine.
>
>
> Elzbieta Burnett wrote:
>>
>> I am given many data files and it would be difficult to have to edit
>> them all.
>
>
> The quick (and dirty) solution is to use under Linux (bash) something like:
>   for FILE in *.dat; do echo "" >> $FILE; done
> which appends to all files ending in ".dat" an empty line - albeit without
> checking whether it ends with a new line or not. (Note the two ">>"; if you
> use ">" you override the file.) In any case, it makes sense to copy the
> files into a new, empty directory - such that you keep original ones as
> backup!
>
> A slightly fancier version, which adds only a new line if the last line
> doesn't have one, is the following shell script:
>
> for FILE in *.dat; do tail -n 1 $FILE|od -a|grep -q nl || echo "" >> $FILE;
> done
>
>
>> Also, there are C++ programs which use same data files and
>> I don't want to cause problems with that code.
>
>
> Usually, programs do not have a problem when a text file ends with a
> new-line character as most programs write such a character. Thus, I assume
> that it will also work with C++. (Having extra empty trailing lines might
> cause problems.)
>
> Tobias
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic