[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #52242] io package: read_namelist fails for so
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #52242] io package: read_namelist fails for some positions of the ending character / |
Date: |
Tue, 17 Oct 2017 11:00:46 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 |
URL:
<http://savannah.gnu.org/bugs/?52242>
Summary: io package: read_namelist fails for some positions
of the ending character /
Project: GNU Octave
Submitted by: None
Submitted on: Tue 17 Oct 2017 03:00:45 PM UTC
Category: Octave Forge Package
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Brice DAVIER
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 3.8.2
Operating System: GNU/Linux
_______________________________________________________
Details:
On version 2.4.7 of the io package, the read_namelist function to read Fortran
namelist files shows an error when the character ending the namelist (/) is
not the first character on its line.
At least on version 4.8.5, gfortran puts a space before the ending / when
writing a namelist to a file, causing the error when loading it in octave.
The attached file 'example.nml' was generated with this Fortran code:
integer :: fu
integer :: a = 1
namelist /example/ a
open(newunit=fu, file='example.nml', status='NEW', action='WRITE')
write(fu, nml=example)
close(fu)
The attached patch makes sure the / character is not included in the
evaluation of the last variable of the namelist.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Tue 17 Oct 2017 03:00:45 PM UTC Name: example.nml Size: 28B By: None
<http://savannah.gnu.org/bugs/download.php?file_id=42182>
-------------------------------------------------------
Date: Tue 17 Oct 2017 03:00:45 PM UTC Name: patch.diff Size: 116B By: None
<http://savannah.gnu.org/bugs/download.php?file_id=42183>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?52242>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #52242] io package: read_namelist fails for some positions of the ending character /,
anonymous <=