f2c conversion

Richard A. O'Keefe ok at goanna.cs.rmit.oz.au
Fri Feb 8 19:05:48 AEST 1991


In article <wbg1Aie00Uh_M18W5e at andrew.cmu.edu>, lt1g+ at andrew.cmu.edu (Luke David Tuttle) writes:
> I am trying to make a fortran to c conversion, but f2c does not allow a
> few fortran commands.  The command ACCEPT <variable> and the conditional
> statements ON DOUBLE PRESION OVERFLOW <some action> are not accepted
> by f2c.  [Origin thought to be hp8000]

They're not standard Fortran, are they?  I have added comp.lang.fortran
to the newsgroups line because it's really a Fortran (dialect) problem.

The simplest thing to do with your ON DOUBLE PRECISION OVERFLOW statements
is to comment them out.  There isn't anything that it could translate into.
(Yes, I know about signal(SIGFPE, ...) but that may not be useful.)  The
best way to handle overflow is to prevent it in the first place; I would
have ***serious*** doubts about the numerical quality of the code you are
trying to port.  Find someone who understands numerical analysis and ask
for advice.

ACCEPT may be a "read from console"; if it is then you can just use an
ordinary READ statement:  for
	ACCEPT <variable>
use
	READ *, <variable>

-- 
Professional programming is paranoid programming



More information about the Comp.lang.c mailing list