HDTenEightyP/NetNews huggingface dataset:
From: dtm@castle.ed.ac.uk (D Muxworthy)
Newsgroups: comp.lang.fortran
Subject: Re: Any free descriptions of Fortran 90 features available ?
Date: 3 Sep 92 12:02:35 GMT
Organization: Edinburgh University

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
utilized in any form or by any means, electronic or mechanical, including
photocopying or microfilm, without permission in writing from the publisher. 
ISO/IEC Copyright Office Case postale 56  CH-1211 Geneve 20  Switzerland"

Whether one approves of it or not, the declaration is clear.  As has been
noted in earlier correspondence, ISO are being quite cooperative in discussing
possibilities of making standards available in machine-readable form, using
Fortran as an example. 
David Muxworthy
Newsgroups: comp.lang.fortran
From: sshws@convx1.lerc.nasa.gov (Herb Schilling)
Subject: Any free descriptions of Fortran 90 features available ?
Organization: NASA Lewis Research Center
Date: Wed, 2 Sep 1992 11:29:19 GMT


Hello,

 I understand that the Fortran 90 standard is not free. I was wondering 
if there is a brief description of Fortran 90's features that I could get for 
free. I would like to pass it out to students in an in-house Fortran class
I teach. I just want to let them know what's coming. Thanks in advance. 
I will summarize any responses I get.

-- 
Herb Schilling , NASA Lewis Research Center , 21000 Brookpark Road, MS 142-5
Cleveland, Ohio 44135 . (216) 433-8955       sshws@convx1.lerc.nasa.gov
Newsgroups: comp.lang.fortran
From: pviswana@uceng.UC.EDU (Prashanth V.)
Subject: Fortran Program that will generate a Fortran program..
Followup-To: comp.lang.fortran
Keywords: Branch INstructions.
Organization: College of Engineering, University of Cincinnati
Date: Tue, 25 Aug 1992 20:37:35 GMT


In my previous post I had mentioned that I need fortran programs that
will generate branch instruction in Fortran. I received many responses and
am very greatful to them. 

What I need is a program that will take as an input the number
of branches. And Output not just Goto Instruction in Fortran but
some IF statements and other Branch statements. The problem I am
having is this:

	Counting the number of Branch instructions. Is there a
way to find out how many branches the program will take. All
possible combinations should be known. If there are DO statements, long
and short jumps, Do loops and whatever Fortran has to offer.

For instance even a DO Loop will be a branch, right? So is there
anyone out there who can help me write a program that will
give me a fortran program that will contain a user specified number
of branches. Not just with Gotos but with DOs, IFs, etc.

Your help will be highly appreciated.

-- 
Prashanth Viswanath				 Elemental empathy
pviswana@uceng.uc.edu				 A change of synergy
pviswana@thor.ece.uc.edu			 Music making contact, 
					 	 Naturally
From: jf@threel.co.uk (John Fisher)
Newsgroups: comp.lang.fortran
Subject: Re: Scientists as programmers
Date: 27 Aug 92 09:43:15 GMT


ajayshah@almaak.usc.edu (Ajay Shah) writes:

> Look at the accent on fortran, for example:
> how could a good programmer possibly use fortran?  It has to be the
> case of a person who wants to get a job done and doesn't take interest
> in the means.

I think you forget, as many people *do* forget when this
discussion comes up, that many people who write programs
are *not* able to chose which language to use. They are
*told* which to use by their management;  the language to
be used for this or that purpose is defined by the
standard practices of the organisation they are a part of.

Accordingly, the problem they have is how to write good
programs in that language.

The endless discussions about the relative merits of
languages, though occasionally interesting, are of little
practical use to a person in that position.

--John
Newsgroups: comp.lang.fortran
From: fjh@cs.mu.OZ.AU (Fergus Henderson)
Subject: Re: Small Language Wanted
Organization: Computer Science, University of Melbourne, Australia
Date: Thu, 27 Aug 1992 16:28:57 GMT

mjs@hubcap.clemson.edu (M. J. Saltzman) writes:

>In article <9224014.17999@mulga.cs.mu.OZ.AU> fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON) writes:
>>mbk@lyapunov.ucsd.edu (Matt Kennel) writes:
>>
>>>UweKloss@lionbbs.bs.open.de ( Uwe Kloss) writes:
>>>: > In addition, C has nothing equivalent to Fortrans **
>>>: > operator nor does it have complex types.
>>
>>Note however that C++ does have complex types.
>                       ^^^^
>Complex types can be implemented as a class...

The complex type is a standard part of C++.
Saying that C++ does not have a complex type is like
saying that C does not have any I/O.
In my opinion, the fact that it can be implemented using
the language rather than being a built-in special feature of
the language is an ADVANTAGE.

Languages like Fortran and Pascal have special primitives for
I/O that cannot be implemented using the language; rather they
must be part of the compilation system. Every such feature is
IHMO evidence of the weakness of such languages.

-- 
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!
-- 
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!
Newsgroups: comp.lang.fortran
From: fjh@cs.mu.OZ.AU (Fergus Henderson)
Subject: Re: Small Language Wanted
Organization: Computer Science, University of Melbourne, Australia
Date: Fri, 28 Aug 1992 07:58:25 GMT

davis@pacific.mps.ohio-state.edu ("John E. Davis") writes:

[Example showing problems with K&R C not having prototypes]

>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. 

No, they are not contradictory.
The compiler must generate code that has the *same effect* as
simply converting to double and then calling pow(), but it is
quite free to substitute any equivalent code which may be more
efficient, for example by converting the call to a couple of inline
multiplications.

>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?

Both GNU C and Microsoft C will inline some standard library functions,
even in C (not C++) programs. This is generally used for simple functions
like strcpy, memcpy, strcmp, etc.  I don't know of any compilers that
apply strength reduction optimizations to calls to pow(), but it
is certainly allowed by the standard and would not be difficult to
implement.

-- 
Fergus Henderson (fjh@munta.cs.mu.OZ.AU) .sig truncated to avoid bugs in system
software that result in duplication of .sig apparently at random (AARRGGHHH!!!)
-- 
Fergus Henderson (fjh@munta.cs.mu.OZ.AU) .sig truncated to avoid bugs in system
software that result in duplication of .sig apparently at random (AARRGGHHH!!!)
From: khb@chiba.Eng.Sun.COM (Keith Bierman fpgroup)
Newsgroups: comp.lang.fortran
Subject: Re: Any free descriptions of Fortran 90 features available ?
Date: 2 Sep 92 13:07:11
Organization: Sun MegaSystems
NNTP-Posting-Host: chiba
In-reply-to: jlg@cochiti.lanl.gov's message of Wed, 2 Sep 1992 17:24:50 GMT



>ISO/IEC 1539:1991(E) contains no copyright declaration at all.  Further,

The Berne convention does not require any copyright declaration. The
US finally signed it, so the US and International rules are very
similar.

However, trying to sue for damages can be made more difficult if one
fails to claim copyright.

INCLUDE "I am not a lawyer and do not play one even in jest"

>purposes, I thought it was permitted for him to make copies (at least

There is no such exemption for entire documents. Never was. There are
classic cases of professors copying entire texts and their university
being sued (and losing). If I recall, the best local case was UCLA.
However see the INCLUDE above.

>the standard is contrary to the very purpose of the standard.  It's

While I am all for free distribution of the standard, this is not a
reasonable argument. The purpose of the standard is to enable programs
to be portable. This means that creators of compilers must understand
the same semantics and that crafters of code ought to.

The text needs to be no more free than compilers. There are those who
claim that all software needs to be free; but there are ample
counterexamples to suggest that this is not the case.

However the standard is written by volunteers funded (usually) by
their employers. One would think that this would enable them to decide
what happens with it. This is, however, not the case. ANSI and ISO own
the copyright, they have said this repeatedly in a wide number of
forums. They have reserved the right to sue anyone who distributes the
standard itself w/o paying them. This is how they fund themselves.

*drafts* of the standard may be (and should be) widely circulated to
facilitate its construction.

--
----------------------------------------------------------------
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: svanhout@cmsa.gmr.com (Sid VanHouten CT90)
Newsgroups: comp.lang.fortran
Subject: date,time,pwd in xlf fortran
Date: 26 Aug 92 12:53:19 GMT
Reply-To: svanhout@cmsa.gmr.com (Sid VanHouten CT90)
Organization: General Motors Research Labs

--
Can anyone tell me how to get date, time of day, and pwd info from xlf fortran
on an RS/6000?

Thanks...
	
Sid VanHouten                svanhout@cmsa.gmr.com (internet)
General Motors Research Labs    (313)986-1958 (phone)
Warren, MI 48090-9055           (313)986-2995 (fax)
From: ags@mentor.cc.purdue.edu (Dave Seaman)
Newsgroups: comp.lang.fortran
Subject: Re: Does your f77 compiler accepts this?
Date: 25 Aug 92 18:39:57 GMT
Organization: Purdue University Computing Center

In article <1992Aug25.153937.26559@newshost.lanl.gov> ttw@beta.lanl.gov (Tony Warnock) writes:

>      WRITE (*,*) (x,x) is legal. It calls for the printing of the
>      COMPLEX variable with real and imaginary parts both equal to x.
	     
>	   ANSI X3.9-1978 13.6.2 line 6 Page 13-16

The paragraph in question is concerned with complex *constants*.

	(2.0,3.0) is an example of a complex constant.
	(X,X) is not a constant, and is not legal Fortran.

If X is a real number, then the complex number X + iX is given in Fortran by

	CMPLX(X,X)

where CMPLX is a required intrinsic function in the ANSI standard.

Each of the statements

	WRITE (*,*) X
	WRITE (*,*) (X)
	WRITE (*,*) CMPLX(X,X)

is legal Fortran, but

	WRITE (*,*) (X,X)

is not.


-- 
Dave Seaman
ags@seaman.cc.purdue.edu
Newsgroups: comp.lang.fortran
From: rmason@ecst.csuchico.edu (Robert Mason)
Subject: Small ftn compiler wanted
Organization: California State University, Chico
Distribution: ca
Date: Thu, 27 Aug 1992 23:43:56 GMT

Does anyone know of a small FORTRAN ('77 or '90?) compiler that
I can ftp from some site? It needs to run on a DOS PC-compatible
machine, and be suitable for compiling small (<64K) model student
programs. Please post your suggestions. Thanks.
-----------------------------------------------
Bob Mason                          Internet: rmason@cscihp.ecst.csuchico.edu
Computer Science                   California State University, Chico
From: khb@chiba.Eng.Sun.COM (Keith Bierman fpgroup)
Newsgroups: comp.lang.fortran
Subject: Re: copying files in FORTRAN on using Sun Fortran
Date: 31 Aug 92 19:02:10
Organization: Sun MegaSystems
NNTP-Posting-Host: chiba
In-reply-to: aswx266@chpc.utexas.edu's message of Sat, 29 Aug 92 06:22:08 GMT


In article <1992Aug29.062208.26841@chpc.utexas.edu> aswx266@chpc.utexas.edu (Michael Lemke) writes:



   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' )


The approriate syntax (as per the Fortran manuals) is

	istat=system(command-string)

The man page (3f) is as follows:


SYSTEM(3F)          FORTRAN LIBRARY ROUTINES           SYSTEM(3F)

NAME
     system - execute a SunOS command

SYNOPSIS
     integer function system (string)
     character*(*) string

DESCRIPTION
     The function system gives string to your shell as input,  as
     if  the string had been typed as a command.  If the environ-
     ment variable SHELL is found, its value will be used as  the
     command interpreter (shell); otherwise sh(1) is used.

     The current process waits until the command terminates.  The
     returned  value  will  be the exit status of the shell.  See
     wait(2) for an explanation of this value.

     Note that historically cc and f77 developed  with  different
     assumptions:  if  cc  calls  system  the shell is always the
     Bourne shell, whereas if f77 calls system which  shell  gets
     called depends on the environment variable SHELL .

     WARNING: System flushes all open files.
     For output files, the buffer is flushed to the actual file.
     For input files, the position of the pointer  is  unpredict-
     able.

FILES
     libF77.a

SEE ALSO
     execve(2), wait(2), system(3)

BUGS
String can not be longer than 1024 characters.

So a working sample program is:

      PROGRAM COPYFILE
      CHARACTER*10 AFILE,BFILE
      INTEGER SYSTEM

      AFILE='bork.f'
      BFILE='bork2.F'

      I= SYSTEM('cp '//AFILE//BFILE)
      IF (I .NE. 0) PRINT*,' SYSTEM COMMAND RETURNED ',I
      END
--
----------------------------------------------------------------
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: mike@execu.execu.com (Mike McCants)
Newsgroups: comp.lang.fortran
Subject: Re: Ignoring Least Significant Bit in a Real Compare
Date: 25 Aug 92 20:54:25 GMT
Distribution: usa
Organization: Comshare, Inc. Austin Development Center

In article <1992Aug24.185047.27463@news.eng.convex.com> joelw@convex.com (Joel Williamson) writes:
>>I am working on a 60-bit CDC machine in Fortran-4.
>>      REQ = .FALSE.
>>      IF (ABS(X1-X2) .LT. EPS) REQ = .TRUE.

>In article <1992Aug21.203055.29668@aero.org> wae@aero.org (William A. Emanuelsen) writes:
>try:
>	J = I1 .OR. I2
                ^^
Inclusive or?!
Exclusive or [.XOR. or XOR(I1,I2)?] is correct.

>	REQ = (J.EQ.1) .OR. (J.EQ.0)

In my opinion,

      REQ = ABS(X1-X2) .LT. EPS

would still be faster on this CDC machine since normally floating
point operations were nearly as fast as integer operations and it
uses fewer operations.
From: sla@fast.ucsc.edu (Steve Allen)
Newsgroups: comp.lang.fortran
Subject: Fortran 90 Advocacy
Date: 25 Aug 1992 21:20:12 GMT
Organization: UCO/Lick Observatory
NNTP-Posting-Host: fast.ucsc.edu
Summary: it has to be readily available
Keywords: GNU, NAG

Personally, I can hardly wait for the arrival of a Fortran 90 compiler on
the machines I use at work.  However, before I get the wonderful opportunity
to use it on any of the Sparc/MIPS/RS6000/80x86/680x0 systems here, I will
have to convince several important persons that it is worth spending the $$$
to obtain such a compiler from some vendor or other.  I perceive that the
implementation of Fortran 90 is not a minor venture, and I expect that the
cost of the compilers will not be trivial.

Some of the new students coming into Lick in the next year will have been
programming on home computers since they left Elementary school.  Others here
are now or will soon be buying the first "adequate" computers for home use.
(Adequate basically means a 32-bit computer with enough disk and speed to
be useful in developing and test-running astrophysically significant codes.
Currently an "adequate" computer can be had for roughly $1000.)

These new students will not likely have had access to any Fortran compiler.
( How many public schools are in the habit of teaching Fortran, especially
with the many features that are lacking in Fortran 77 ? )  I am not sure how
to motivate someone who has grown up using a free or nearly-free C or C++
compiler that it is worth their while to switch to Fortran now that they
have entered the university.  I am not sure how to motivate someone who
has just spent $1000 on a home computer that it is worth spending half
again as much on a Fortran 90 compiler.

Herein I see a great problem.  I'd love to see Fortran survive and thrive.
I do not see how that can happen if Fortran 90 compilers do not become almost
as cheap as and available on as many platforms as GNU's GCC.  Craig Burley's
admirable efforts to create GNU Fortran 77 demonstrate just how many man years
are required.

How can Fortran 90 be advocated best?  How can it get enough momentum to
justify its introduction into High School computer classrooms?
_______________________________________________________________________________
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: jlg@cochiti.lanl.gov (Jim Giles)
Subject: Re: scientists as programmers
Organization: Los Alamos National Laboratory
Date: Thu, 27 Aug 1992 18:04:14 GMT

In article <1992Aug27.140153.23191@colorado.edu>, ejh@khonshu.colorado.edu (Edward J. Hartnett) writes:
|> [...]
|> I think I should have been more clear when I said that scientists are,
|> in general, not as good programmers as professionals. [...]

People who write scientific/numerical programs for a living (instead
of as an adjunct to their scientific work) *ARE* professionals.  Yet,
their background is real science, not computing "science" (because no CS
type would even understand the problems).

|> [...]
|> If I could sit down all those scientists in a room and tell them one
|> thing, it would be that in all my experience programming, nothing is
|> more worthwhile than documentation. Particularly with science, if it's
|> not documented, it's almost useless, and will be completely useless
|> whenever it's handed to someone other than the original programmer.
|> Why? Because with science you have to KNOW what's going on in the
|> code. A small mistake can EASILY skew scientific results. And the time
|> invested in organization and documentation is more than repaid again
|> and again. 

However, too many CS types view documentation as an end rather than
a means - that is, they write comments which do not elucidate:

      x++;  /* add one to x */

A good document consists of an abstract description of what the code
does, an abstract description of the algorithm which is being used, its
numerical properties, its speed (using big O notation if more precision 
is not available).  The code itself has only a *few* imbedded comments 
which indicate the correspondence of the code to the abstract algorithm.  
One should not try to explain the algorithm *with* interspersed comments, 
nor should one merely restate in english what the specific statements do 
(if you can't read the language, take a tutorial).

Too often, the CS style documentation contains headers which name
the programmer, give the date of completion of the code, the date
of the last modification or bugfix, the language used (as if you
couldn't tell by looking at the code itself), and some joke about
known bugs that the author will *soon* fix (though the last mod
was years ago and the author has since left).  The author then
tries to explain the algorithm with interspersed comments *in* the
body of the code - and fails to write *either* a good description
of the algorithm *or* a good code.  But it's "fully documented"
by the criteria they were tought in school.

|> [...]
|> I guess it's exactly the same with professional programmers; I wasn't
|> convinced of this until I ended up with a job working on someone
|> else's code, [...]

Gee, in *all* my jobs, for 20 years, I've had to work with someone
else's code.  The dreaded "someone else's code" problem is commonplace
in programming.

-- 
J. Giles
From: molagnon@brutus.ifremer.fr (Michel Olagnon, Ifremer DITI GO, 98.22.41.44)
Newsgroups: comp.lang.fortran
Subject: Re: F77, array passing question, dimensions.
Date: 27 Aug 92 09:58:51 GMT
Reply-To: molagnon@brutus.ifremer.fr
Organization: Ifremer

In article 20430@news.clarkson.edu, russell@sun.soe.clarkson.edu (David Russell) writes:
>
>   Given an array dimensioned to lets say 10 in a calling routine,
>and given the fact that only the first three values are needed in
>the called routine, is there any advantage or disadvantage to
>dimensioning the array to only 3 in the called routine.
>
>....
>
>ie. Is there any savings in time, space, performance,......
>--

Many of the Fortran compilers that I have known show dramatic improvement
when I/O is performed on the array in the called routine, thus needing no
implied do-loop.
My programs often replace
  write (lu) (x (i), i=1, n)
with
  call wrtsub (lu, x, n)
  ....
  end
  subroutine wrtsub (lu, x, n)
  real x (n)
  write (lu) x
  return
  end

For large n, I had cutdowns by a factor of 6.

Of course, another advantage may be array-bound checking in debugging the subroutine.

---
| Michel OLAGNON            | EMAIL : Michel.Olagnon@ifremer.fr  |
| IFREMER - Centre de Brest |                                    |
| B.P. 70                   | PHONE : +33  98 22 41 44           |
| F-29280 PLOUZANE - FRANCE | FAX   : +33  98 22 41 35           |
From: JRBANGA@poppy.ucdavis.edu (JULIO RODRIGUEZ BANGA)
Newsgroups: comp.lang.fortran
Subject: Fortran with GUI
Date: 24 Aug 92 02:09:35 GMT
Organization: University of California, Davis
X-News-Reader: VMS NEWS 1.20


  Hi, everybody!
  I'd like to create GUIs for some Fortran 77 scientific programs (data
input/output, graphics, etc.) in the Windows 3.0 environment.
  I was thinking about using MS Visual Basic to create the front end, and MS
 Fortran to compile the Fortran kernel.

  Has anyone gone through the same experience?
  Any suggestions/advices/comments?
  Is there a better way to do it?
  Thanks a lot in advance!
 
   Julio R. Banga
   University of California, Davis
Newsgroups: comp.lang.fortran