read(5,*) problem?

From: Mark Mackey (markm_at_chiark.greenend.org.uk)
Date: 09/22/04


Date: 22 Sep 2004 12:34:30 +0100 (BST)

Hi all.

A simple F77 question: I'm trying to read in and parse lines containing
something like

filename 46 F 3.273

using

read(unit,*) charvar,intvar,logvar,realvar

This works fine, usually. However, it fails horribly when the filename
contains path information: it looks to me like the read treats the '/'
character as an end-of-field. Should it do so? I'm not familiar enough
with the F77 standard to know what the assumed end-of-field characters
are in this situation, and whether it's possible to change them.

At the moment I have to work around this by reading the whole line in as
a string, manually splitting on spaces, and parsing from there, which is
*ugly*.

-- 
Mark Mackey                           http://www.swallowtail.org/
Now halfway though his record immortality attempt:
aleph-1 moments down, aleph-1 to go....