Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: oberman@ptavv.llnl.gov
Subject: Problems with portable Fortran terminal IO
Date: Thu,  4 Nov 93 23:21:56 GMT	[thread overview]
Message-ID: <2bc6a2$rem@lll-winken.llnl.gov> (raw)

I have hit a surprising Fortran compatability problem, terminal record length.

I have a WRITE to LUN * 
	(WRITE *,200)buff

where buff is CHARACTER*1 BUFF(132) and the format includes several header
lines for a total length of about 250 characters. The FORMAT is quite long, but
the string, buff is (132A). This fails with a output record overflow on the VAX
(VMS 5.5-2, Fortran V5.9) but works on every other platform we run the code on.
These include SunOS, HP-UX, Irix, UniCOS, and several others.

the problem is that the default RECL for sequential formatted output is 133
bytes. I'm curious why this limit is present. Any clues? Any way that is
portable to get around this. The only thing I can fine is to explicitly open
SYS$OUTPUT with a large RECL. And I have not found a "standard" way of doing
this that will port to other platforms. CSC says I'm stuck.

I should note that for some reason if I do a declaration of CHARACTER*132 BUFF
and load buff with 132 characters it will work file without a special OPEN. I
don't understand this, either.

Any compiler gurus have any idea of why and any possible solutions? (I hate
conditional code, but will use it if I have to.)

R. Kevin Oberman			Lawrence Livermore National Laboratory
Internet: koberman@llnl.gov		(510) 422-6955

Disclaimer: Being a know-it-all isn't easy. It's especially tough when you
don't know that much. But I'll keep trying. (Both)


             reply	other threads:[~1993-11-04 23:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-11-04 23:21 oberman [this message]
1993-11-05  2:09 ` Problems with portable Fortran terminal IO Steve Lionel
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox