HDTenEightyP/NetNews huggingface dataset:
From: rff@inf.rl.ac.uk (Ronald Fowler)
Newsgroups: comp.lang.fortran
Subject: Re: Why CALL EXIT? (was Re: Question for C ==> Fortran)
Date: 30 Jul 92 11:24:38 GMT
Organization: Rutherford Appleton Laboratory, Informatics Department, U.K.

In article <1992Jul29.204115.3917@walter.cray.com> wws@craywr.cray.com (Walter Spector) writes:
>|>         CALL EXIT
>|>         END
>|> The "CALL EXIT" at the bottom is optional (more-or-less). A "STOP" statement
>|> would do just as well.
>This is something I have never understood in almost 20 years of Fortran
>programming.  Why do so many people use the non-standard CALL EXIT
>instead of the standardized-for-over-25-years STOP statement?
>Is/was there magic associated with it on some arcane systems?

Did you mention Suns? :-)
I find it very annoying that a program compiled with "f77 -fast" will always
give a short essay on the finer points IEEE modes when it terminates. Calling
EXIT instead of STOP is one way round this (why is there no compiler flag for
this and the even more stupid way that programs write "trace back logs" when
Control-C is used??)

Ron Fowler
Newsgroups: comp.lang.fortran
From: simon@giaec.cc.monash.edu.au (simon shields)
Subject: adj arrays
Keywords: hp720,adjustable arrays
Organization: Monash University, Melb., Australia.
Date: Tue, 28 Jul 1992 04:28:52 GMT


More on problems with adjustable arrays.
I am using 
HP-UX giaec A.08.07 A 9000/720 2001133857
and have been having trouble implementing adjustable arrays using f77
compiler.
I used the example in the manual as follows

      program main
	  i=10
	  call routine (i)
	  end

	  subroutine routine (i)
	  integer dyn_array(i)
	  dyn_array(i)=i
	  end

It comes up with the error
eg.f:
   MAIN main:
   routine:
Declaration error on/above line 9 of eg.f;  for dyn_array; adjustable dimension on non-argument

f77: Error.  No assembly.
f77: Errors detected, no link
 so i tried 

$STANDARD_LEVEL SYSTEM
      program main
	  i=10
	  call routine (i)
	  end

	  subroutine routine (i)
	  integer dyn_array(i)
	  dyn_array(i)=i
	  end

and i get 
eg.f:
Warning on line 1 of eg.f: unknown inline compiler option
   MAIN main:
   routine:
Declaration error on/above line 10 of eg.f;  for dyn_array; adjustable dimension on non-argument

f77: Error.  No assembly.
f77: Errors detected, no link

Whats going on hp ?

Any help much appreciated.

Newsgroups: comp.lang.fortran
From: mrl@uai.com (Mark R. Ludwig)
Subject: Re: Is there a good Integer Random number generator in FORTRAN??
Organization: Universal Analytics, Inc., Torrance (LA), CA
Distribution: usa
Date: 31 Jul 92 11:59:36

In article <1992Jul30.192401.10394@uceng.UC.EDU> pviswana@uceng.UC.EDU (Prashanth V.) writes:

           I am looking for a good Integer random number generator that
   does not make use of any of the systems libraries. Can anyone please lead
   me to one.

Find a library, colleague or classmate with back-issues of the
Communications of the ACM (usually abbreviated CACM).  The October,
1988 issue has a substantial discussion of an algorithm with good
randomness characteristics, and presented several different
implementations of it for different hardware platforms.  It does _not_
use the time-honored but computationally-horrible "controlled integer
overflow" technique.  Despite being geared toward real numbers in the
range (0,1) (or is it [0,1]?), it really uses integers internally and
I think you should be able to adapt it to your liking.$$
-- 
INET: mrl@uai.com      BANG: uunet!uaisun4!mrl      ICBM: USA; Lower Left Coast
  "You can get a crowd to clap at a phone number, if the inflection is right."
   -- Dave Ross
From: ccsdhd@gdt.bath.ac.uk (Dennis Davis)
Newsgroups: comp.lang.fortran
Subject: Re: Why CALL EXIT? (was Re: Question for C ==> Fortran)
Date: 31 Jul 92 09:35:58 GMT
Organization: Bath University Computing Services, UK

In article <30JUL199215540929@ltp2.gsfc.nasa.gov> gumley@ltp2.gsfc.nasa.gov (Liam E. Gumley) writes:
>In article <131935@lll-winken.LLNL.GOV>, miller@icf.llnl.gov (Pat Miller) writes...
>> 
>>In article <1992Jul29.204115.3917@walter.cray.com>, wws@craywr.cray.com
>>(Walter Spector) writes:
>Well folks I used to use the STOP statement all the time, but I got
>really tired of the message it would print on execution (does it in MS-Fortran
>and SGI MIPS Fortran).  So I left it out completely.  At the end of a main
>program, I typically just close any files, then put an END statement.
>It works.

It works because it is supposed to work that way.  Quoting from the
Standard, Section 11.14:

  "If executed in a function or subroutine subprogram, it has the
   effect of a RETURN statement (15.8).  If executed in a main
   program, it terminates the execution of the executable program."

>Seems to me the only place you should have a STOP statement is
>at the end of a main program anyway.  So why not do away with it?

The END statement represents the physical end of a program.  It
also represents the logical end of a program if you choose to
terminate the program by executing the END statement.  Abolishing
the STOP statement would constrain programmers to making sure that
the logical end of their program is the same as the physical end.
This would prevent them writing code illustrated by the following
pseudo code:

      IF ( really_nasty_condition_arises ) THEN
        ... Holy mother of moses !  The solids have impacted
            upon the air-conditioning and I'm stuck here upfront
            wearing a white suit.  Take emergency bale-out action ...
        .
        .
        STOP
      ENDIF

If you are stuck deep down in a nest of subroutines when
really_nasty_condition_arises rears its ugly head, it could well
require a lot of convoluted code to surface back up to the END
statement in the main program.  The STOP statement is very useful.
It ensures that the logical end of a program doesn't have to
coincide with the physical end.
-- 
Dennis Davis, BUCS, University of Bath, Bath, BA2 7AY, United Kingdom
D.H.Davis@bath.ac.uk     ...!uunet!mcsun!ukc!gdr!D.H.Davis
From: bauwens@acs.ucalgary.ca (Luc Bauwens)
Newsgroups: comp.lang.fortran
Subject: Re: MS Fortran 5.1 upgrade. Is it worth it?
Keywords: fortran, Microsoft
Date: 25 Jul 92 02:39:32 GMT
Organization: The University of Calgary, Alberta

In article <chepan.711985212@gsusgi1.gsu.edu> chepan@gsusgi1.gsu.edu (Parthasarathy Nambi) writes:
> Hi,   
>
> Has anyone upgraded to MS Fortran 5.1 from 5.0. Is it worth the money?
> I have seen advertisements from Microsoft that using 5.1, it is
> possible to write Windows apps - is this true and has anyone actually
> developed any apps that is properly functional under Windows 3.0 or 3.1?
>
> The ad also claims that one can write apps upto 16MB!? Any comments
> on this.

I used to use 5.0; I got 5.1 but I recently acquired Watcom fortran 9.0.

Little difference between 5.0 and 5.1, except with 5.1 you can (apparently,
I haven't tried), write programs that will run under Windows and (I can
confirm this, having tried) 16 bits, OS/2 1.3 executables.  (IN both
cases, without the graphics libraries).

I think 5.1 will run under Windows, and I know that it works under OS/2 2.0.
It have the strong impression that the exe files created by 5.1 are
larger, and somewhat more memory-hungry that 5.0.

I am happy with the Watcom compiler (price after academic discount:
US $ 250.00).  It's a 32 bit, 386/486 compiler.  It comes with a DOS
extemder that's DPMI-compatible (runs under 3.1 and OS/2 2.0) that can
be distributed with the executable, runs under DOS. windows and
OS/2 2.0 and besides creating DOS+extender executables, also creates
windows (32 bits) and 32 bits OS/2 2.0 executables.

Comes with a DOS (only) graphics library very similar to MS 5.x, except
it supports 800x600 and 1024x768, which MS doesn't support.

The 32 bit apps run about 35% faster than the 16 bits MS apps.

At this point, the only reason as to why I keep MS 5.1 on my
hard disk, is to make DOS plain vanilla stuff that will run without the
extender.

Luc B
Newsgroups: comp.lang.fortran
From: jal41820@uxa.cso.uiuc.edu (Smiley)
Subject: Segmentation Violation help SOLVED
Organization: University of Illinois at Urbana
Date: Thu, 23 Jul 1992 16:36:55 GMT
Keywords: help


As it was, my system really didn't want to handle a 60x60x11 array, and
seemed to choke when it started to fill up. It seems to like 11 60x60 arrays
a lot better.  :)

Thanks for everyone who tried to help...
-- 
        Josh Laff              #     #      
email to: smiley@uiuc.edu     _       _     Hello! I am a signature virus!  
      (217) 356-6079         |#\_____/#|    Join the fun and copy mo*#(*&^!>.
                              \#######/     
Newsgroups: comp.lang.fortran
From: rchattam@nyx.cs.du.edu (King Chattam)
Subject: MEASURE EXEC TIME OF PROGRAM
Organization: Nyx, Public Access Unix @ U. of Denver Math/CS dept.
Distribution: usa
Date: Tue, 21 Jul 92 23:46:10 GMT

Hello everyone,
  I am using Microsoft FORTRAN on a DOS 5.0 PC. I want to 
measure the execution time of some of my programs. Does
anyone have a FORTRAN or FORTRAN callable C function which 
will answer my question? If such a routine is available in 
some public domain, the address of it also will suffice.
Thanks for your help
From: ce1zztw@prism.gatech.EDU (Tommy Barr)
Newsgroups: comp.lang.fortran
Subject: gnu-fortran
Date: 25 Jul 92 04:32:05 GMT
Organization: Georgia Institute of Technology


    Hello all,

    I did not see a faq, but is there a gnu version of fortran
    or anything similar available.

    Tommy     ce1zztw@prism.gatech.edu


-- 

Tommy Barr (404)894-2260           ce1zztw@prism.gatech.edu

Newsgroups: comp.lang.fortran
From: cowan@impec.zko.dec.com (Ken Cowan)
Subject: Re: Portability of DIRECT UNFORMATTED data files?
Reply-To: cowan@impec.zko.dec.com (Ken Cowan)
Organization: Digital Equipment Corporation
Date: Wed, 29 Jul 92 14:36:59 GMT

In article <Bs5F3H.AB0@news.udel.edu>, mccalpin@perelandra.cms.udel.edu (John D. McCalpin) writes:
|>
|>In article <1992Jul29.111524.1@lure.latrobe.edu.au> matap@lure.latrobe.edu.au (Andrej Panjkov, La Trobe Maths) writes:
|>>What does the standard say about the internal format of DIRECT UNFORMATTED
|>>data files? 
|>
|>I have not looked, but I suspect that the standard says nothing useful
|>for portability here.
|>
|>>Will these be portable between systems?  (ie is a D/U file written by
|>>a Fortran program on one system readable by a Fortran program on another?)
|>
|>There is a growing range of machines for which Fortran direct access files
|>use the same internal format.  Right now I share Fortran DA files between
|>Sun, Silicon Graphics, and IBM RS/6000 machines completely transparently.
|>
|>(Note: the OPEN statement on the SGI may differ, since the RECL= parameter
|>is in 32-bit words, while Sun & IBM use a RECL of bytes.)
|>
|>These machines also use identical formats for Fortran sequential unformatted
|>files.
|>
|>Many other machines are definitely *not* the same format, such as the
|>DECstations, which have their bytes swapped.  I think that Stardent
|>does some funny swapping as well - perhaps on half-words?
|>
|>I am told that there exist options in Cray Fortran to output IEEE binary
|>files.  I do not know if they implement exact compatibility with the 
|>Sun/SGI/IBM machines for DA files or for sequential unformatted files.
|>-- 
|>--
|>John D. McCalpin                        mccalpin@perelandra.cms.udel.edu
|>Assistant Professor                     mccalpin@brahms.udel.edu
|>College of Marine Studies, U. Del.      John.McCalpin@mvs.udel.edu
|>

   DEC Fortran V3 on the DECstation has an option that lets you read RS/6000
direct access unformatted files.  Try "CONVERT=BIG_ENDIAN" as an open statement
option.  This is documented in the release notes for V3.1.

   KC
Newsgroups: comp.lang.fortran
From: lionel@quark.enet.dec.com (Steve Lionel)
Subject: Re: Structure Chart for VAX/VMS F77
Organization: Digital Equipment Corporation
Date: 29 JUL 92 16:29:13    


In article <29JUL92.14304853@wl.aecl.ca>, zinckt@wl.aecl.ca writes...
> 
>Sorry about the confusion, maybe I can explain what I am want a little better. 
>I am looking for a tool that wil produce a dependancy chart of subroutine calls
>and data passing from subroutine and functions. I am documenting F77 code which 
>consists of 20 or so subroutines/modules. I want to be able to visualize the 
>calling sequence and the data flow a little easier. Is there a tool that could
>help me do this? I am working on VAX/VMS with F77 and C. 
> 

Digital's "Source Code Analyzer" (SCA) product, which is combined with the
"Language-Sensitive Editior" (LSE) product can do this.   For example, here's
what SCA gives you when you ask for the "CALLED_BY" tree for the LINPACK
benchmark:

D1 procedure calls
   DGEFA procedure calls
   .  DAXPY function
   .  DSCAL function
   .  IDAMAX function
   DGESL procedure calls
   .  DAXPY function  (See above)
   .  DDOT function
   MATGEN procedure calls
   .  MOD function
   SECOND function
DAXPY procedure calls
   MOD function  (See above)
DDOT function calls
   MOD function  (See above)
DSCAL procedure calls
   MOD function  (See above)
IDAMAX function calls
   DABS function

The latest version, V4.0, can also give you a graphical display if you're
using a workstation, and can save the display in a file which you can 
print.  The call tree can start from any "node" and can be of any
selected depth.  You can also tell SCA to eliminate "uninteresting"
routines if you like, as well as get a tree in "called from" order.

You can also ask SCA for reports on variable usage, including uses as
actual and/or formal arguments, have it check for argument list consistency
between caller and callee, or have it generate documentation from your
FORTRAN (or other language) source.

LSE/SCA is also available as part of the DECSET (formerly VAXSET) package
and is available for OpenVMS VAX as well as RISC ULTRIX.

Steve Lionel                    lionel@quark.enet.dec.com
Languages Group
Digital Equipment Corporation
110 Spit Brook Road
Nashua, NH 03062
From: henrik@mpci.llnl.gov (Henrik Klagges)
Newsgroups: comp.lang.fortran
Subject: NTIS or other test suite sought (please 8-)
Date: 27 Jul 92 16:56:16 GMT

Hello,
does anybody know by chance where I can get a tape/ftp/*
the NTIS test library or a similarly useful test library ?

--

Cheers, Henrik
MPCI at LLNL
IBM Research
From: david (David Bourne)
Newsgroups: comp.lang.fortran
Subject: DIR from within VAX Fortran
Keywords: DIR VAX
Date: 29 Jul 92 21:28:42 GMT
Reply-To: david-bourne@uokhsc.edu (David Bourne)
Organization: Univ Oklahoma - College of Pharmacy
Originator: news@essex.ecn.uoknor.edu

I have written a program in FORTRAN for the Mac, IBM, and am now porting it 
to the VAX environment. It runs OK with a few problems. At one point I ask 
the user to enter a file name. If the user gets it wrong and the file doesn't 
exist I can give the user the opportunity to do a directory call. With the 
Mac its a standard toolbx call. With MS FORTRAN 5.0 on the IBM I use a pause 
statment which allows the users to enter the DIR *.DAT for example to do a 
directory before reasking for the file name. On the VAX the pause only allows 
the user to enter continue. Anything else aborts the program. Does anyone 
have suggestions for a work around. Thanks.

David Bourne, OU HSC College of Pharmacy
1110 N. Stonewall Ave, Oklahoma City, OK, 73117-1223
(405) 271-6471 david-bourne@uokhsc.edu
Newsgroups: comp.lang.fortran,comp.programming,comp.unix.questions
From: zaphiri@watson.ibm.com (Zaphiris Christidis)
Subject:  Subroutine Tree Generator
Date: Tue, 21 Jul 1992 21:42:58 GMT
Reply-To: zaphiri@watson.ibm.com  (Zaphiris Christidis)
Disclaimer: This posting represents the poster's views, not necessarily those of IBM
Organization: IBM T.J. Watson Research Center.

Greetings everybody.

Does anybody know if there exists any tool or program in the public
domain, that could take as an input a FORTRAN source code, and give
as an output the subroutine calling tree of the code graphically?

Replies by personal e-mail would be appreciated.

Regards,
--
Zaphiris Christidis
zaphiri(@watson.ibm.com @yktvmh.bitnet)
Newsgroups: comp.lang.fortran
From: wws@craywr.cray.com (Walter Spector)
Subject: Why CALL EXIT? (was Re: Question for C ==> Fortran)
Organization: Cray Research, Inc.
Date: 29 Jul 92 20:41:15 CDT


In article <1992Jul29.134901.1@slacvx.slac.stanford.edu>, fairfield@slacvx.slac.stanford.edu writes:
|> [a bunch of stuff, then...]
|>         CALL EXIT
|>         END
|>
|> The "CALL EXIT" at the bottom is optional (more-or-less). A "STOP" statement
|> would do just as well.

This is something I have never understood in almost 20 years of Fortran
programming.  Why do so many people use the non-standard CALL EXIT
instead of the standardized-for-over-25-years STOP statement?
Is/was there magic associated with it on some arcane systems?

(At least there aren't many codes twiddling 'sense lights' anymore. :-)

Walt
-- 
Walt Spector
(wws@renaissance.cray.com)
Sunnyvale, California
_._ _._ _.... _. ._.
From: kimd@acsu.buffalo.edu (Donghyo Kim)
Newsgroups: comp.lang.fortran
Subject: Lahey FORTRAN 5.0
Date: 25 Jul 92 18:46:32 GMT
Organization: UB


Is there anyone who runs Lahey's FORTRAN 5.0 in OS/2 DOS box?
They claims it supports DPMI 0.9 and 1.0 spec with Pahr Lap's DOS
Extender and it can be run inside WIN3.X.
If so, can it be run inside OS/2 DOS box?

Thanks in advance.
-- 
   Donghyo Kim                             W) 716-636-2120           
   Northwestern Univ.                     dhkim@casbah.acns.nwu.edu
   SUNY at Buffalo                         kimd@acsu.buffalo.edu
From: elrsc@lut.ac.uk (RSChandran)
Newsgroups: comp.lang.fortran
Subject: Fortran Reference Book For Electromagnetic Modelling
Date: 22 Jul 92 14:56:06 GMT
Organization: Loughborough University, UK.


Could anyone suggest a reference book for fortran language, which is to be
used for Electromagnetic modelling. I have seen several books on
solving statistical problems, numerical analysis etc, but none in the field
mentioned above.

All the informations will be appreciated.

Thanks in advance.

R.S.Chandran

R.S.Chandran@lut.ac.uk
From: raymond@cs.vu.nl (Raymond Michiels)
Newsgroups: comp.lang.fortran
Subject: WANTED: FORTRAN argument checker (flint?)
Keywords: FORTRAN, lint
Date: 30 Jul 92 07:01:23 GMT

Now that I've been cursed with having to program in that F language,
it really annoys me to find out that some (most?) F*RTR*N compilers
(notably HP's) do not perform any argument checking. Does anybody
know of a PD program that performs such checks? Something like UNIX/C
lint for F*RTR*N programs.

Thanks in advance,

	-Raymond.


PS: Please reply by e-mail since I don't read this newsgroup regularly.
Newsgroups: comp.lang.fortran
From: hirchert@ncsa.uiuc.edu (Kurt Hirchert)
Subject: Re: Variable repeat count specifier for FORMAT statments
Originator: hirchert@pluto.ncsa.uiuc.edu
Organization: Nat'l Ctr for Supercomp App (NCSA) @ University of Illinois
Distribution: na
Date: Fri, 24 Jul 1992 01:20:58 GMT

In article <1992Jul23.215113.16531@jhunix.hcf.jhu.edu> psun@jhunix.hcf.jhu.edu (Peter Sun) writes:
>My apologies if this questions seems trivial, but I've tried to find the
>answer in so many places.  I need to know how to give a variable as the
>number of repeat counts to a format field descriptor statement.  For
>example I know on VAX/VMS this can be done with something like:
>
>                   write (*, '(<n>(I8))')
>
>which will repeat the format descriptor I8 n number of times, but I haven't
>found this portable to other compilers.  Namely, the MIPS Fortran 77
>compiler for the SGI IRIS system.  Is there a standard for this?  Or is it
>just compiler dependent.

This is a VAX extension.  It is not standard, but in most cases there are
standard replacements.

In this case, I would simply replace <n> with a large number; the format
interpreter will ignore the excess repetitions of (I8).  In more complex
situations, I would build the format on the fly:

		      character*80 fmt
		      ...
		      write (fmt,'(a,i3,a)') '(',n,'(I8))'
		      write (*,fmt) whatever_it_is_you_wanted_to_write

The first write statement creates in the variable fmt a copy of your
example format with the current value of n replacing <n>.  The second
write then uses the variable fmt as the format to write whatever it was
that you originally wanted to write.
-- 
Kurt W. Hirchert     hirchert@ncsa.uiuc.edu
National Center for Supercomputing Applications
Newsgroups: comp.lang.fortran
From: alan@dmsmelb.mel.dms.CSIRO.AU (Alan Miller)
Subject: Re: Fortran unformat format???
Organization: CSIRO, Div. of Mathematics & Statistics, Melbourne, Vic., AUSTRALIA
Date: Thu, 30 Jul 1992 02:21:25 GMT

In article <1992Jul28.221417.1176@mic.ucla.edu> shinn@agsm.ucla.edu (Shinn-Tzong Wu) writes:
>I tried to write a C program to read a Lahey (F77L3) generated unformatted
>file, but I could not find any document (either in Lahey or Microsoft)
>about how to decode the header (FD 13 00 00 00 etc), worse, Lahey's
>format is different from Microsoft's!  Would anyone please shed some
>light in how to find the doc?  Thanks.
>
>
>Shinn

My manual for Lahey's Fortran gives the format!

In part, it says:

Unformatted sequential files begin with a 1-byte header with hex value "FD".
A record-length indicator appears at the beginning and end of each record.
At the beginning:
The lower two bits of the first byte indicate the number of additional bytes
(0-3) that will follow.   The upper 6 bits are low order bits of the record
length.   The following byte (if indicated) contains the next 8 bits of
record length, and so forth.

The difference between the starting and end record lengths seems to be the
length of the beginning record length indicator.

-- 
Alan Miller, Quality Improvement Project
CSIRO Division of Mathematics & Statistics, Melbourne, Australia
Phone: +61 3 542-2266   Fax: +61 3 542-2474  E-mail: alan@mel.dms.csiro.au
Mail: CSIRO DMS, Private Bag 10, Clayton, Vic. 3168, Australia
Newsgroups: comp.lang.fortran
From: ivab015@hermes.chpc.utexas.edu (Albert Wu)
Subject: Pretty Printer for Fortran Programs
Organization: The University of Texas System - CHPC
Date: Tue, 28 Jul 92 19:01:23 GMT

Hello, friends.  I need your help.  Is there any freeware Fortran program
printer around that I can ftp ?  Thanks a lot in advance.
Newsgroups: comp.lang.fortran
From: system@alchemy.chem.utoronto.ca (System Admin (Mike Peterson))
Subject: Re: why are fortran binaries so large?
Organization: University of Toronto Chemistry Department
Date: Fri, 24 Jul 1992 17:09:26 GMT

In article <OHL.92Jul23231746@ips105.desy.de> ohl@ips105.desy.de (Thorsten Ohl) writes:
>
>At least on Apollos and HP-UX boxes you can trick the compiler to
>allocate the offending array in the BSS segment by putting it into a
>COMMON block.  Yes, it's a hack, but it can reduce the size of your
>binaries tremendously.

If you use the '-K' option (to save and zero your variables), HP-UX
will always create a huge executable; Apollo/Domain, SGI and IBM
RS/6000 do not even when SAVE (or the compiler switch equivalent) is
used, unless of course DATA is used to actually initialize
the variables/arrays, when there is no alternative except to write
them into the executable. Otherwise the COMMON trick does the job.
-- 
What are the chances that any computer system will ever "work" properly?
... and Slim just left town. -*- Mike Peterson, SysAdmin, U/Toronto Chemistry
Xref: sparky comp.lang.fortran:2788 comp.programming:2043 comp.unix.questions:9262