Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Q] f2c questions

0 views
Skip to first unread message

Bob Smither

unread,
May 15, 1995, 3:00:00 AM5/15/95
to
Dear Comp.Lang.Fortran readers,

I am porting a program from MS Powerstation to Linux using the fine
f2c/gcc combination. Three items are giving me problems:

1. Is there a built-in function that specifies the number of command line
arguments? I know how to get around this, but wondered if there were a
cleaner way.

2. Are time and date functions available, analogous to the MS calls
gettim and getdat?

3. Is there a method to provide user interaction during program
execution? I would like to be able to change some program parameters
such as convergence criteria from the keyboard while the program is running.

Many Thanks!

===========================================================================
Bob Smither Office:(713)331-2744 | 1-800- Vote Libertarian:
Circuit Concepts, Inc. Fax:(713)331-4616 | 682- Smaller Government,
smi...@neosoft.com BBS:(713)331-0860 | 1776 Bigger People
===========================================================================

Emilio C. Lopes

unread,
May 16, 1995, 3:00:00 AM5/16/95
to
Bob Smither (smi...@neosoft.com) wrote:
: Dear Comp.Lang.Fortran readers,

: I am porting a program from MS Powerstation to Linux using the fine
: f2c/gcc combination. Three items are giving me problems:

: 1. Is there a built-in function that specifies the number of command line
: arguments? I know how to get around this, but wondered if there were a
: cleaner way.

Yes, there is. The best way to learn all that f2c can do (and what
it can't) is to look at f2c.ps, the docs of f2c. Unfortunatelly, f2c.ps
is *NOT* distributed with the Linux binaries of f2c. You can get f2c.ps
from:

research.att.com:/netlib/f2c/f2c.ps.Z

: 2. Are time and date functions available, analogous to the MS calls
: gettim and getdat?

I think you'll have to use the C library to do that. Do a

prompt% apropos time

and see what you get from section 3 of the man pages. It should be
easy to make use of these C functions.

: 3. Is there a method to provide user interaction during program

: execution? I would like to be able to change some program parameters
: such as convergence criteria from the keyboard while the program is running.

What is wrong with READ and WRITE/PRINT?

: Many Thanks!

: ===========================================================================
: Bob Smither Office:(713)331-2744 | 1-800- Vote Libertarian:
: Circuit Concepts, Inc. Fax:(713)331-4616 | 682- Smaller Government,
: smi...@neosoft.com BBS:(713)331-0860 | 1776 Bigger People
: ===========================================================================


You're welcome!

--
Emilio C. Lopes E-mail: e...@gluon.if.usp.br
Instituto de Fisica e...@if.usp.br or e...@uspif.if.usp.br
Universidade de Sao Paulo ecl%us...@brfapesp.bitnet
Caixa Postal 66318 uspif::ecl
05389-970 Sao Paulo - SP Phone: (55)(11) 818-6724 (Voice)
BRAZIL (55)(11) 814-0503 (Fax)

0 new messages