[comp.lang.c] f2c conversion

lt1g+@andrew.cmu.edu (Luke David Tuttle) (02/06/91)

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.  Does someone doing f2c conversions know of some fortran
commands I could substitute.  I think the original code was run on a
hp8000....

Luke Tuttle
lt1g@andrew.cmu.edu

ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) (02/08/91)

In article <wbg1Aie00Uh_M18W5e@andrew.cmu.edu>, lt1g+@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