HDTenEightyP/NetNews huggingface dataset:
From: UweKloss@lionbbs.bs.open.de ( Uwe Kloss )
Newsgroups: comp.lang.fortran
Organization: The Lion Town BBS, Brunswik, Germany
Subject: Re: Small Language Wanted
Reply-To: UweKloss@lionbbs.bs.open.de
X-Software: HERMES GUS 1.00 Rev. Jan 16 1992
Date: Sun, 23 Aug 1992 22:18:06 MET

In <DAVIS.92Aug23010605@pacific.mps.ohio-state.edu>, "John E. Davis" writes:

> (Old K&R C might take something like
> `x = (a * b) / c' and rearrange it as `x = a * (b / c)' which could be deadly
> for many algorithms).
If you find a compiler (K&R) who does this, trash it and blame
it on the implementor!
This is definitely wrong behaviour, even for K&R!


> In addition, C has nothing equivalent to Fortrans **
> operator nor does it have complex types.
The differeces between code the compiler generates and
the one that is linked as a library or inserted by the
preprocessor.


> And arrays, C has no true array type
> like Fortran does (One must use pointers to pointers ... to pointers).
Did you ever try:     int a[12][34];
And             :     a[x][y] = somewhat;


> Yes Fortran is still superior to C for what it is intended to do:
> Numerical Work.
This is mainly because, as you said, there's much 'canned solutions'.


> Anyone who ``regularly lambast physicists for using "old" languages like
> Fortran'' is a little ignorant in my view.
Let's say that's not very polite! ;-)
By the way, what does 'lambast' really mean?
I can guess it from the text, but never came across it yet.

Uwe
-- 
Eliminiere das Unmoegliche. Was immer uebrig bleibt, so
unwahrscheinlich es auch wirkt, muss die Wahrheit sein.
Aber was ist, wenn einmal NICHTS mehr uebrig bleibt?
   (nach: John Brunner - Mehr Dinge zwischen Himmel und Erde)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Uwe Kloss                   UUCP: UweKloss@lionbbs.bs.open.de
Fasanenstrasse 65           BTX:  0531336908 0001
3300 Braunschweig           FIDO: not connected
Newsgroups: comp.lang.fortran
From: ahn@mpx2.lampf.lanl.gov (Hyo E. Ahn)
Subject: FAQ  request
News-Software: VAX/VMS VNEWS 1.41    
Organization: Los Alamos National Laboratory
Date: Sat, 29 Aug 1992 10:05:00 GMT

Hello,

Could someone please post or mail me a copy of the FAQ for this group?

Thanks

	
	Hyo Ahn

	Bitnet:		AHN@LAMPF
	Internet:	AHN@DAC.LAMPF.LANL.GOV
From: acmeyer@hpfcso.FC.HP.COM (Alan C. Meyer)
Date: Tue, 25 Aug 1992 18:57:58 GMT
Subject: Re: unresolved references getarg and mclock on HPUX (hp9000/730)
Organization: Hewlett-Packard, Fort Collins, CO, USA
Newsgroups: comp.lang.fortran

In comp.lang.fortran, dfa@lhdsy1.lahabra.chevron.com (D.F. Andersen) writes:

> netters:
> 
> I give up (sort of :)
> (email replies will get to me best!  thanks!)
> 
> I need some common UNIX system interface routines to get MCNP
> working on the hp9000/730
> 
> My test code is:
> 
>  cat <</EOF  >zz.getarg_mclock_link_prob.f
>  c
>  c   check out linking problem on hp9000/730,
>  c   f77  thiscode.f   can't find getarg, mclock
>  c
>         integer getarg
>         integer mclock
>         character*32   arg
> 
>         call  getarg(1,arg)
> 
>         call  mclock()
> 
>         stop 13
>         end
>  /EOF

Here is some information about MCLOCK.  First, your mclock() use of
mclock above should be as a function ...

>    [59] % cat patch.hp700.directives.hp9000x800.1
>    $HP9000_800 INTRINSICS
>    [60] %
>    [60] %
>    [60] % f77 +Q patch.hp700.directives.hp9000x800.1   zz.getarg_mclock.src.f
>    zz.getarg_mclock.src.f:
>       MAIN:
>    /bin/ld: Unsatisfied symbols:
>       mclock (code)

At the next release of the Fortran compiler, MCLOCK will be recognized as
an "800 intrinsic" - your above example will then work.  For now, a workaround
is given below.

>    [64] % nm /usr/lib/libcl.a | fgrep -i clock
>    Symbols from /usr/lib/libcl.a[f_ftnmclock.o]:
>    MCLOCK              |         0|extern|entry  |$CODE$
>    clock               |          |undef |code   |
>    nm:  /usr/lib/libcl.a:  no symbols
>    nm:  /usr/lib/libcl.a:  no symbols
>    [65] %
> 
> 
> but how do I get to it ??

As you see, the entry in the library is MCLOCK, but the reference in your
code is to mclock (by default, the compiler downshifts external references).
One way to access MCLOCK is to use an $ALIAS directive:

	$ALIAS mclock="MCLOCK"
		i = mclock()
		...

This will force the external name of mclock to be MCLOCK and your code
should link correctly.

Alan Meyer
Colorado Language Lab

"These are my own opinions ..."
Newsgroups: comp.lang.fortran
From: ih96@sol.acs.unt.edu (Yu Zhi)
Subject: detect EOF under unix inside fortran program?
Keywords: EOF, unix, open
Organization: University of North Texas
Date: Wed, 26 Aug 1992 21:58:30 GMT

Hi there. Sorry if this is a trivial FAQ. I'm woking in unix enviroment and
in some of the fortran programs I want to detect if the opened files 
is at the end. I know in Microsoft Fortran you have EOF intrinsic function.    
Is there any similar function under unix? By the way I'm using Dynix and
Sun/OS. Please mail me since I'm not often see this group. Thanx.
From: roman@gaudi.ccsf.caltech.edu (Roman Salvador)
Newsgroups: comp.lang.fortran
Subject: Converting F77 programs to HPF (or CM-Fortran)
Keywords: HPF, F77, CMF
Date: 14 Aug 92 21:50:59 GMT
Organization: California Institute of Technology, Pasadena

Does anybody know what has been the experience with the conversion
of actual applications to HPF (i.e. converting F77 code to CM-Fortran)?.
I.e. does one just modify the F77 source or does one need to actualy
rewrite most of the code?.
I would be most interested in hearing about actual experiences.

Roman Salvador
From: mukai@ROS6.GSFC.NASA.GOV (Koji Mukai)
Newsgroups: comp.lang.fortran
Subject: Size of executables
Date: 3 Sep 92 19:48:09 GMT

Dear Learned Netters,

One recent post compared the size of executables between Fortran and C,
in passing.  That has reminded me of something I've noticed a long time
ago:  the size of the executable files are very different between VAX/VMS
(PROG.EXE) and UNIX (a.out) versions.

I did one test: a program that simply says "hello" on stdout.

     VAX/VMS  HELLO.EXE: 6 blocks ~3 kbytes
     Sun f77  a.out: ~49 kbytes
     Sun cc   a.out: ~16 kbytes

In more realistic cases with big arrays and complex calculations,
I don't have detailed numbers but the Sun Fortran versions tend to
be 4-10 times bigger than the VAX/VMS version, whenever I checked.

(1) Why?   (Just curious)
(2) Can I make the Sun executables any smaller (the above numbers are
after strip)?  Am I missing some compiler switches or something?
(3) Are there any penalties for big executables, apart from the obvious
need for more disk space?  Or for that matter, any advantages?

				Koji Mukai
Xref: sparky comp.lang.fortran:3323 comp.unix.cray:258
From: tpd6908@yak.COM (Tom Dickens)
Newsgroups: comp.lang.fortran,comp.unix.cray
Subject: CRAY-YMP language constants != machine constants.
Date: 31 Aug 92 22:09:40 GMT
Followup-To: comp.lang.fortran
Organization: Boeing Computer Services

Just thought I would inject some personal experience on a Y-MP (Unicos 6.1).
I have an application with mixed C and FORTRAN.  I needed some constants
such as min/max float values and found them in a C include file.  I then
copied these numbers into a FORTRAN routine, compiled, and got out-of-range
compiler errors.  Doing the same thing in C worked OK.

I still do not have an explination from Cray why this happened.

Tom Dickens:  Boeing Computer Services:  Aerodynamics Computing
	>>> Speaking for myself, not for Boeing.  <<<
From: mbk@lyapunov.ucsd.edu (Matt Kennel)
Newsgroups: comp.lang.fortran
Subject: Re: Small Language Wanted
Date: 27 Aug 1992 23:00:31 GMT
Organization: Institute For Nonlinear Science, UCSD
NNTP-Posting-Host: lyapunov.ucsd.edu
X-Newsreader: Tin 1.1 PL3

fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON) writes:
: No, in principle if the library function in question is a *standard*
: library function, then its implementation is just a part of the
: compilation system. When the compiler sees #include <math.h>, it can
: 	- read /usr/include/math.h
: 	- read foobar.xyzzy
: 	- insert the appropriate declarations without reading any file.
: 
: Furthermore, when it sees
: 
: 	pow(a,i)
: 
: in your code, and "i" happens to be an integer then it can emit code to
: 	- call the standard pow() function after convertin
: 	  i to a double
: 	- call a special function the calculates doubles to
: 	  integer powers
: 	- calculate the exponentiation using inline code.

Suppose in foo.c I do the above.  Then in pow.c I have my own
new defintion of "pow" which does something different.

How does C know when compiling foo.c the difference :

cc -c foo.c
cc -o foo foo.o -lm

vs.

cc -c foo.c
cc -c pow.c
cc -o foo foo.o pow.o -lm

???

Or is this a resolved problem?

Question:  Do you know which real live C compilers that people can buy or
steal which do in fact perform the optimizations that we're talking about?

Say, perhaps, computing pow(x,4) with *TWO* FP multiplications.

I suspect the percentage is about 85% for Fortran, and maybe 10% for C,
but I really have no idea.

: Fergus Henderson             fjh@munta.cs.mu.OZ.AU      
: This .signature virus is a self-referential statement that is true - but 
: you will only be able to consistently believe it if you copy it to your own
: .signature file!

--
-Matt Kennel  		mbk@inls1.ucsd.edu
-Institute for Nonlinear Science, University of California, San Diego
-*** AD: Archive for nonlinear dynamics papers & programs: FTP to
-***     lyapunov.ucsd.edu, username "anonymous".
Newsgroups: comp.lang.fortran
From: davis@pacific.mps.ohio-state.edu ("John E. Davis")
Subject: Re: Small Language Wanted
Reply-To: davis@pacific.mps.ohio-state.edu  (John E. Davis)
Organization: "Dept. of Physics, The Ohio State University"
	<H.3lvmyc56w&A@lionbbs.bs.open.de>
	<1992Aug27.181926.5677@alchemy.chem.utoronto.ca>
	<9224107.5975@mulga.cs.mu.OZ.AU>
	<DAVIS.92Aug27211418@pacific.mps.ohio-state.edu>
Date: Fri, 28 Aug 1992 06:53:32 GMT


In a previous article <DAVIS.92Aug27211418@pacific.mps.ohio-state.edu> I
presented a C program which demonstrates that simply including math.h into a C
program does not guarantee that `float y, x = 2.0; int i = 4; y = pow(x,i)'
will produce the correct value for y as a previous poster suggested:

      >In other words, the _ONLY_ differences between an operator and a
      >function are 
      >  (1) the syntax is different
      >  (2) for the function, you should include the appropriate header file
      >      before using it.


It has been pointed out to me by several people that this is compiler
dependent and the a true ansi compliant answer will produce the correct
answer. This is because instead of a declaration like:

                   extern double pow(/* double, double */);

the ANSI declaration would read:

                   extern double pow(double, double);


This has the effect of performing the correct typecasts before calling the
function `pow'.

But then this behavior contradicts something else the other poster said:

     >pow(a,i)

     >in your code, and "i" happens to be an integer then it can emit code to
     >        - call the standard pow() function after convertin
     >           i to a double
     >        - call a special function the calculates doubles to
     >          integer powers
     >        - calculate the exponentiation using inline code.
     >Ie. it can make EXACTLY the same optimizations that Fortran compilers
     >make when they see a**i.
     >[...]
     >Any function that is part of the standard library is a "built-in"
     >function. 

This seems to imply that if I do:

int i = 4; float y, x = 2.0;  y = pow(x,i)

The code for pow will recognize that 4.0 = (double) i is equivalent to the
integer 4 and will generate code like:

       return(tmp = 2.0 * 2.0, tmp * tmp);

as opposed something like 

       return( exp ( 4.0 * log(2.0));

Are there really any existing C compliers out there that perform such
optimizations?       

--
     _____________
#___/John E. Davis\_________________________________________________________
#
# internet: davis@amy.tch.harvard.edu
#   bitnet: davis@ohstpy
#   office: 617-735-6746
#
Newsgroups: comp.lang.fortran
From: aswx266@chpc.utexas.edu (Michael Lemke)
Subject: Re: copying files in FORTRAN on using Sun Fortran
Organization: The University of Texas System - CHPC
Date: Sat, 29 Aug 92 06:22:08 GMT

In article <1992Aug28.195415.27820@ctr.columbia.edu> anselmo@cumesb.mech.columbia.edu (Andrew P. Anselmo) writes:
>
>Sorry to intrude on the scientists can/cannot program  issue, but a small
>technical problem...
>
>How easy is it to submit unix commands while in a Fortran program?
>
>I basically need to copy a file (without knowing the format or what's
>inside) to another; I've RTFM, but I can't seem to track it down.

Although I don't know where you can find it (presumably man 3F intro 
should get you started) it is easy as pie:

	call system( 'cp file1 file2' )

If you want to feed the command's output back to a Fortran variable 
(something similar as set a=`date`) it gets tricky.  You would need 
popen for this but I don't know if that is equally easy to access as
system.  See the man page as I mentioned above.

-- 
Michael Lemke
Astronomy, UT Austin, Texas
(michael@io.as.utexas.edu or UTSPAN::UTADNX::IO::MICHAEL [SPAN])
From: JRBANGA@poppy.ucdavis.edu (JULIO RODRIGUEZ BANGA)
Newsgroups: comp.lang.fortran
Subject: Giving a GUI to Fortran programs
Date: 23 Aug 92 19:04:47 GMT
Organization: University of California, Davis
X-News-Reader: VMS NEWS 1.20


 Hi everybody.

 I've got several Fortran 77 programs that I would like to run using the
Windows 3.0 enviroment in a 386 or 486 PC. For that purpose, I'll use the
Microsoft compiler. Yeah, I know there are better compilers under DOS, but I'm
trying to give these programs a graphical user interface using Microsoft Visual
Basic. 

 So, my questions are:

 - Has anyone tried this combination (Ms Visual Basic + Ms Fortran) ?
   Does it work ok? Anything I should be aware of?

 - May I use other compiler than Microsoft (i.e., Lahey) and still can use a
Visual Basic program as a front end?

 - Is there a better way to give a Fortran program a GUI under Windows 3.0?

      Thanks a lot in advance.

                                      Julio  R.  Banga
                                      University of California, Davis.
Newsgroups: comp.lang.fortran
From: stngiam@athena.mit.edu (Shih-Tung Ngiam)
Subject: Re: Looking for tools to explore FORTRAN77 programs
Organization: Massachusetts Institute of Technology
Date: Sat, 29 Aug 1992 18:35:57 GMT

>>I'm looking for  program tools  which are  capable of finding out the
>>calling structure and the use of common  variables within a big, mul-
>>tiple file  FORTRAN77 program.  If anyone knows about tools like that
>>(either evaluating cross references or the F77 source itself), please
>>let me know. I am  interested in  commercial as well as public domain
>>software.
>
>We use the product 'FORTRAN-lint' from Information Processing Techniques, and
>are very happy with it.  It runs on several different platforms.  The number
>for IPT is (415) 494-7500.

   I called IPT up.  Unfortunately, $3900 for a single-user license is
somewhat beyond our budget.  Are there any more economical alternatives?

Shih Tung
Chem E
Best l'il Tech School
on the Charles
Newsgroups: comp.lang.fortran
From: system@convax.iar.nrc.ca (Jim.Jordan)
Subject: Summary:LynxOS 680x0 Fortran Compilers
Reply-To: system@convax.iar.nrc.ca (Jim.Jordan)
Organization: National Research Council,Ottawa,Canada
Date: Thu, 27 Aug 1992 10:15:18 EDT

Hello:						Aug-27-92

	This is to summarize responses to my request for information on Fortran
compilers that would work with LynxOS on 680x0 processors (particulary 68040):

1) Use f2c to convert Fortran code to C and use the Lynx supplied GNU C
   compilers to generate machine code. One could write a script or use "make"
   so that the extra step would be transparent to the user. Symbolic debugging
   might not be too straightforward:   
				: Steve Allan : sla@helios.ucsc.edu

2) ACE Associated Computer Experts in Amsterdam has a suite of compilers for
   680x0 processors running LynxOS including Fortran 77. There are front ends
   for C,Fortran,Modula and Pascal and back-ends producing optimized code for
   68000/10, 68020/30, 68040, 68881/882 in Common Object File Format (COFF).
   Assembler,linker and debugger (assembler and source) available. Allows 
   mixed language linking. ACE is at Van Eeghenstraat 100, 1071 GL Amsterdam,
   The Netherlands, tel +31 20 6646416, fax +31 20 6750389, telex 11702,
   e-mail: info@ace.nl
				: Julian Blake : blake@dxcern.cern.ch

3) FSF is developing a Fortran compiler for their GNU software suite. This 
   will ready for beta test shortly.
				: Craig Burley: burley@gnu.ai.mit.edu
				: GNU FORTRAN mailing list:
				  info-gnu-fortran-request@prep.ai.mit.edu


						Regards

						---Jim---

________________________________________________________________________________
Jim Jordan,				Internet: jordan@convax.iar.nrc.ca
Rm.233, Bldg. U-61, FRL			Phone: (613) 998-4809
Institute for Aerospace Research,	Fax:   (613) 952-1704
National Research Council,	
Ottawa, CANADA  K1A 0R6
________________________________________________________________________________
From: jlg@cochiti.lanl.gov (Jim Giles)
Newsgroups: comp.lang.fortran
Subject: Re: Small Language Wanted
Date: 28 Aug 92 15:38:44 GMT
Organization: Los Alamos National Laboratory

In article <1992Aug28.102630.1@vxdesy.desy.de>, pawlak@vxdesy.desy.de writes:
|> [...]
|> Pardon me, but does C have any I/O? It seems to me that all it has are
|> functions with side-effects... Having things that 'can be implemented'
|> instead built-in features leads to: 1) having them implemented by various
|> people in incompatible ways, 2) making the programs larger, and thus harder
|> to read, as any program using such thing has to declare it first.

C's I/O is every bit as standardized as Fortran's in that the functions
which are referred to here are defined as part of the language's required 
library support.  Since Fortran I/O is also *usually* supported by compiler
generated library calls, and since ANSI C allows compliant compilers
to special case standard functions anyway (by inlining them, etc. - provided
it has reliably determined that no user replacements have been made),
this makes C's I/O as built-in as Fortran's.  Which is actually a better
design depends on what you're trying to do.

-- 
J. Giles
From: bigelow@hpfcso.FC.HP.COM (Jim Bigelow)
Newsgroups: comp.lang.fortran
Subject: Re: Looking for tools to explore FORTRAN77 programs
Date: 3 Sep 92 20:48:48 GMT
Organization: Hewlett-Packard, Fort Collins, CO, USA

In comp.lang.fortran, stngiam@athena.mit.edu (Shih-Tung Ngiam) writes:

> >We use the product 'FORTRAN-lint' from Information Processing Techniques, and
> >are very happy with it.  It runs on several different platforms.  The number
> >for IPT is (415) 494-7500.
> 
>    I called IPT up.  Unfortunately, $3900 for a single-user license is
> somewhat beyond our budget.  Are there any more economical alternatives?
> 

Well... If you've got an HP workstation, there is a lintfor (fortran-lint) 
that comes with the fortran product.

Jim Bigelow
Colorado Lang. Lab.
HP

All standard disclaimers apply 
  - not offical HP policy
  - blah, blah, blah
From: khb@chiba.Eng.Sun.COM (Keith Bierman fpgroup)
Newsgroups: comp.lang.fortran
Subject: Re: Fortran 90 Advocacy
Date: 26 Aug 92 09:55:40
Organization: Sun MegaSystems
NNTP-Posting-Host: chiba
In-reply-to: sla@fast.ucsc.edu's message of 25 Aug 1992 21:20:12 GMT


>....ruminations about cost of Fortran 90 processors.

NAG has very attractive site/educational licenses. I'd bet that
parasoft does too.

I would suggest that those with an interest in pricing contact the
vendors. It may be much cheaper than you think.


	f90-info@parasoft.com
nag:  708/971-2337  971-2706 (fax)
vast: 213-820-2200  820-4141 (fax) 
--
----------------------------------------------------------------
Keith H. Bierman    keith.bierman@Sun.COM| khb@chiba.Eng.Sun.COM
SunPro 2550 Garcia MTV 12-33             | (415 336 2648) fax 964 0946
Mountain View, CA 94043  <speaking for myself, not Sun*> Copyright 1992
From: sla@umbra.ucsc.edu (Steve Allen)
Newsgroups: comp.lang.fortran
Subject: Re: Any free descriptions of Fortran 90 features available ?
Summary: we seem to have different versions here...
Date: 4 Sep 92 05:41:06 GMT
Organization: UCO/Lick Observatory
NNTP-Posting-Host: umbra.ucsc.edu

In article <25481@castle.ed.ac.uk> dtm@castle.ed.ac.uk (D Muxworthy) writes:
>In article <1992Sep2.172450.5360@newshost.lanl.gov> jlg@cochiti.lanl.gov
>(Jim Giles) writes:
>>What exactly *is* the copyright requirement on the standard?  My copy of
>>ISO/IEC 1539:1991(E) contains no copyright declaration at all.
>Eh?  Page ii contains the following:
>"(C) ISO/IEC 1991
>All rights reserved.  No part of this publication may be reproduced or ...

Interesting.  The copy I have of said document has no such notice on page ii.
This does not mean that I will be dropping it into the copier hopper...
_______________________________________________________________________________
Steve Allen          | That was the equation!         |   sla@helios.ucsc.edu
UCO/Lick Observatory | Existence!...Survival must     | If the UC were opining,
Santa Cruz, CA 95064 | cancel out programming! -- Ruk | it wouldn't tell me.
Newsgroups: comp.lang.fortran
From: tlihsin@hubcap.clemson.edu (lih-sin the)
Subject: Re: How to convert FORTRAN to C?
Organization: Clemson University
Date: Mon, 31 Aug 1992 19:00:55 GMT

gjlai@csie.nctu.edu.tw (Guan-Joe) writes:

>Hi, 
>	Does anybody know how to get the converter for FORTRAN to C, under UNIX system? Thanks very much.

>	Best Regards, G.J. Lai,  e-mail: gjlai@csie.nctu.edu.tw

	How about using f2c, which translate fortran code to C. f2c can
be downloaded from many ftp-anonymous sites, one of them is
wuarchive.wustl.edu.
Newsgroups: comp.lang.fortran
From: bross@splatter.nas.nasa.gov (Bill Ross)
Subject: Re: NAMELIST simulating routine
Keywords: NAMELIST
Organization: Numerical Aerodynamic Simulation Facility NASA
Date: Fri, 28 Aug 92 06:21:41 GMT
Reply-To: bross@splatter.nas.nasa.gov (Bill Ross)

 Nelson H.F. Beebe of the University of Utah wrote a fortran-only
portable namelist which was part of the <plot79> graphics package.

c               Nelson H.F. Beebe
c               Center for Scientific Computing
c               Department of Mathematics
c               220 South Physics Building
c               Salt Lake City, UT 84112

It requires a little more work than the compiler-supplied namelists,
since the variable names must be declared in arrays with corresponding
arrays of type codes for the same variables... bet you'll make a mistake!

The package itself looks very nice. The date on my version is 1982. There
are 1754 lines of code and 2124 comment lines. The object code is 57.7K on
a mips, 49.6K on a Crimson and 41.6K on an HP 730.

Bill Ross                
Newsgroups: comp.lang.fortran