HDTenEightyP/NetNews huggingface dataset:
From: Peter.Hammond@brunel.ac.uk (Peter D Hammond)
Newsgroups: comp.lang.fortran
Subject: Re: Is this a Compiler Bug ?
Date: 2 Oct 92 11:23:32 GMT
Organization: Brunel University, Uxbridge, UK
X-Newsreader: Tin 1.1 PL3

ivab015@hermes.chpc.utexas.edu (Albert Wu) writes:
: The following program cannot be compiled by fortran compilers on a Sun as well
: as on a RS6000.  Apparently, the backslash is treated as a continuation
: symbol.  Is this considered a bug in this program or a bug in the compiler.
: 
	{program deleted}

Hi,
I think it must be considered a bug in the program. Its always a problem
when you want to use a token symbol literally. I just got this to compile
and run on a Sun IPX using Sun F77:


      program test

      character*30 string
	integer ibksl

	write (*,*) slash  ! FRO DEBUGGING

      string = "1234567890123456\\8901234567890"

	write (*,*) string  ! FOR DEBUGGING

      ibksl = index ( string, "\\" )
      print *, 'ibksl=',ibksl

      end

and got the following output:


\
1234567890123456\8901234567890
ibksl=  17

The slashes were absent in both strings in your original, and ibksl = 0.

Hope this helps. 


-- 
BFN, Pete.

 Dept. Materials Technology | Dont pay any attention. | You sometimes have to  
 Brunel University          | Its only my opinion.    |    listen to
 Uxbridge                   |                         | A lot of useless talk.
 Middx, UB8 3PH, UK.        |                         |         N. Peart. (RUSH)
From: mulvihil@oasys.dt.navy.mil (Lawrence Mulvihill)
Newsgroups: comp.lang.fortran
Subject: Quickie
Date: 5 Oct 92 20:26:57 GMT
Reply-To: mulvihil@oasys.dt.navy.mil (Lawrence Mulvihill)
Distribution: usa
Organization: Carderock Division, NSWC, Bethesda, MD

Silly fortran question 980678

      integer n
      n=1
      write(*,n)
    1 format(2x,'my brain hurts')
    2 format(.....
    .
    .
    .


Does not work.  How to fix?  Suggest IF statements and I bite you.

Ciao
From: sandee@Think.COM (Daan Sandee)
Newsgroups: comp.lang.fortran
Subject: Re: second()
Date: 28 Sep 1992 11:42:22 GMT
Organization: TMC
Distribution: na
NNTP-Posting-Host: telecaster.think.com

In article <BuzBLn.KrG@cs.dal.ca>, glenn@cs.dal.ca (Glenn McCarville) writes:
|> I am doing conversion of fortran programs to C and have come across a
|> fortran function second(). Is this a standard fortran function? What does
|> it return? The libraries provided with the f2c translator do not have a
|> definition for it.

No, second() is not standard Fortran. Commonly, it is supposed to return
the CPU time consumed since the start of the program. Some O/Ses provide
it as a Fortran-callable function (e.g., UNICOS). Otherwise you have to 
figure out which equivalent O/S call to use.

Daan Sandee                                           sandee@think.com
Thinking Machines Corporation
Cambridge, Mass 02142                                 (617) 234-5044
From: ppychin@VNET.IBM.COM ("Philip P. Chin")
Newsgroups: comp.lang.fortran
Subject: Re: Is this a Compiler Bug ?
Date: 2 Oct 92 14:30:57 GMT

The backslash has special meaning in AIX and the XLF compiler will treat
them as such on RS/6000 if no option is used.  However,  the -qnoescape
option should take care of your problem by not giving special treatment
to the backslash.

Thanks,
Phil Chin
From: ruckman@oasys.dt.navy.mil (Christopher Ruckman)
Newsgroups: comp.lang.fortran
Subject: Re: Graphics Library for MS Fortran
Date: 2 Oct 92 10:49:08 GMT
Reply-To: ruckman@oasys.dt.navy.mil (Christopher Ruckman)
Organization: Carderock Division, NSWC, Bethesda, MD

In comp.lang.fortran, chenzn@ucunix.san.uc.edu (Zhanzhan Chen) writes:
>        I never used MS Fortran before. What I am wondering is
>that if MicroSoft Fortran has a graphics library. I asked this

It does indeed.  MS Fortran 5.1 also comes with the QuickWin Graphics
Library, which has routines for doing graphics under MS Windows.
From: stecker@gn.ecn.purdue.edu (Scott D. Stecker)
Newsgroups: comp.lang.fortran
Subject: using LIBRY.lib
Date: 4 Oct 92 00:40:15 GMT
Article-I.D.: gn.1992Oct4.004015.1633
Organization: Purdue University Engineering Computer Network

I have just recently purchased MS Fortran v5.1 (I would have liked a 32 bit
compiler such as Watcom's but this was an educational deal I couldn't pass up)
And obtained the math library from wuarchive.wustl.edu /mirrors/msdos/fortran
 named LIBRY51.zip (I'm pretty sure that is the name) and have tried getting
it to work. When I call certain functions from that library the linker
spits out the error "unresolved external ...." from what I have read in the
manual the only clue it gives me is that it has to do with case specifity
and I have played with that option to no avail. If anyone has any experince
using this library I would apreciate hearing about any experiences you have
had. Thanks
   email stecker@gn.ecn.purdue.edu
From: klassen@sol.UVic.CA (Melvin Klassen)
Newsgroups: comp.lang.fortran
Subject: Re: Is this a Compiler Bug ?
Date: 2 Oct 92 18:03:59 GMT
Article-I.D.: sol.1992Oct2.180359.19238
Organization: University of Victoria, Victoria, B.C. CANADA

In article <*> jlg@cochiti.lanl.gov (Jim Giles) writes:
> Few implementations allow unescaped control characters in a string though 
> (after all, the record separator is a character - so how does one distinguish
> between a record separator which terminates the present statement prematurely
> and one which is intended to be an element of the character constant?) ...

It depends on your model of a file-system.
I have experienced two models on IBM main-frame computers:
 - each record of the source-file is of fixed-length,
   usually 80 characters.  
 - each record of the source-file is of varying-length,
   and a prefix to each record defines the length of the record.

In either model, any(!) character can appear within the record, 
without introducing any ambiguities, i.e., the presence of a 
record-separator within the record becomes a non-issue.
Newsgroups: comp.lang.fortran
From: jlg@cochiti.lanl.gov (Jim Giles)
Subject: Re: Is this a Compiler Bug ?
Organization: Los Alamos National Laboratory
Date: Mon, 5 Oct 1992 17:31:09 GMT

In article <KHB.92Oct2134224@chiba.Eng.Sun.COM>, khb@chiba.Eng.Sun.COM (chiba) writes:
|> ...
|>    be solved.  In the above case, there is no reason that `\' should
|>    not be simply accepted.
|> 
|> Yes there is. A long standing Unix tradition of usage of \ dating back
|> to the first Unix f77 compiler. Changing this behavior by default
|> would break some large (but unknown in precise size) set of existing
|> codes. 

What UNIX does is irrelevant to a language design and should be
irrelevant to a language implementation.  UNIX does a lot of stuff
I wouldn't want to have imported into a language.  Since such an
escape is not necessary in Fortran, there's no reason to support it.
In any case, codes which use this dubious feature will break when
moved to most other implemenations anyway - you should have a version
of the compiler which warns the user not to use backslash as an escape
an which *doesn't* use it as an escape as the default behavior.

As it is, using `/' as an escape symbol is just confusing to Fortran
users who quite reasonably expect the entire character set (or, at 
the very least, the entire printable character set) to be allowed in 
character strings.

-- 
J. Giles
Newsgroups: comp.lang.fortran
From: bai@msiadmin.cit.cornell.edu (Dov Bai-MSI Visitor)
Subject: Re: How do I make MS Fortran 5.1 use lots of memory?
Organization: /usr/local/lib/news/organization
Date: Wed, 30 Sep 1992 20:28:17 GMT

In article <25715@oasys.dt.navy.mil> ruckman@oasys.dt.navy.mil (Christopher Ruckman) writes:
>Can someone help me figure out how to compile/link my program and run
>it under DOS using MS FORTRAN 5.1, pleeeeze!  I've spent hours thumbing
>through the manuals, but I just can't seem to figure it out!
>
>I have a 486-50 with 16MB of RAM.  The program source code is about
>2000 lines, and includes lots of real*8 and complex*16.  The biggest
>array is something like 130 by 37 (complex*16).  I'd be glad to elaborate
>if that's not enough info.

Let's see:
   Number of bytes for largest array is:
       130 * 37 * 16 * 2 = 153920 > 64k.

Looks like you are still below the DOS 640k limit, but your big array
is larger than 1 segment (64k). You should either declare this array
with the [HUGE] attribute, or to avoid playing with segments just
compile it with the HUGE memory model. Add the /AH compiler switch
in compilation. The default is /AL, the large memory model.

If you hit in the future the DOS 640k limit, you can still use 
the compiler under OS/2 and it would let you address 16M. I think
that Ver. 5.1 works also under MS-WINDOWS which may also let you
use the extended memory. 
 
Dov
From: ken@unixg.ubc.ca (Kenneth White)
Newsgroups: comp.lang.fortran
Subject: Using Lahey EM/32 under OS/2 2.O
Date: 2 Oct 92 15:00:28 GMT
Organization: University of British Columbia, Vancouver, B.C., Canada
Originator: ken@unixg.ubc.ca

The new Version 5.01 of Lahey EM/32 actually runs fine as a DOS application
under OS2 2.O. In fact, it runs even faster than under DOS, largely I think
because I/O is faster. However, I can't get the ALLOCATE function to get
more than 600K. Apparently ALLOCATE is going only after real memory.
Does anyone know how to get it to grab Extended memory? I can get huge
amounts when running under DOS. Even when I run the VMM version it
only grabs real memory.
From: martelli@cadlab.sublink.org (Alex Martelli)
Newsgroups: comp.lang.fortran
Subject: Re: F77 Compilers for MS-DOS PC's
Date: 30 Sep 92 10:16:32 GMT
Organization: CAD.LAB S.p.A., Bologna, Italia

bai@msiadmin.cit.cornell.edu (Dov Bai-MSI Visitor) writes:
	...
:Could someone who used both MS-FORTRAN 5.x and the WATCOM 9.0
:compare the debugging facilities of WATCOM ver. MS-FORTRAN ?
:MS-FORTRAN has the CodeView debugger as well compiler switches
:which would point to the line in code in which an array is out 
:of bounds or other floating-point exceptions occured. 

I have used both Codeview and WVIDEO, the WATCOM debugger, and
find the latter infinitely superior, indeed maybe the best
debugger in my experience.  From mixed C/fortran debugging
without tears, to easy remote debugging via serial, parallel
or network, to a powerful command language for macros, to
fully operational commands with either keyboard or mouse, I
really can't think of ONE debugger feature that WVIDEO lacks!

WATCOM Fortran does have a /DEBUG switch to generate code for
runtime checking, such as array subscripts and string bounds,
with a traceback on failure (not just the failing line, but a
full stack trace, as I recall; however, I haven't had much
occasion to exploit that, since we port already-working code
to the PC rather than developing afresh on it, so my memory
may be faulty on this point).

I really cannot see ANY possible reason for preferring
Microsoft products to the wonderful offerings of WATCOM,
although I assume somebody will come up with some.  (note
that I have no connection with either Watcom OR Microsoft,
except being a VERY satisfied customer of the former, and
a VERY unsatisfied customer of the latter, for years).
-- 
Email: martelli@cadlab.sublink.org                   Phone: ++39 (51) 6130360
CAD.LAB s.p.a., v. Ronzani 7/29, Casalecchio, Italia   Fax: ++39 (51) 6130294 
Newsgroups: comp.lang.fortran
From: K1XE000 <K1XE@UNB.CA>
Subject: Wanted : BFN description of F77 and F90
Organization: The University of New Brunswick
Date: Fri, 2 Oct 1992 02:23:02 GMT

Dear Neters-
I am looking for a complete BNF description of F77 and/or F90.
An FTP site would be fine.
Please e-mail results.
I will summarize to net.

Tom
K1XE@UNB.CA
University of New Brunswick
FREDERICTION, NB, CANADA


--------------------------------------------------------
Thomas R. A. Zinck
Faculty of Computer Science  "Beer does the body good"
University of New Brunswick
Fredericton , N.B. , CANADA
K1XE@UNB.CA
--------------------------------------------------------
From: ruckman@oasys.dt.navy.mil (Christopher Ruckman)
Newsgroups: comp.lang.fortran
Subject: How do I make MS Fortran 5.1 use lots of memory?
Date: 30 Sep 92 19:35:33 GMT
Reply-To: ruckman@oasys.dt.navy.mil (Christopher Ruckman)
Organization: Carderock Division, NSWC, Bethesda, MD

Can someone help me figure out how to compile/link my program and run
it under DOS using MS FORTRAN 5.1, pleeeeze!  I've spent hours thumbing
through the manuals, but I just can't seem to figure it out!

I have a 486-50 with 16MB of RAM.  The program source code is about
2000 lines, and includes lots of real*8 and complex*16.  The biggest
array is something like 130 by 37 (complex*16).  I'd be glad to elaborate
if that's not enough info.

I've been using something like

    fl /Gt /Os /Zi fcon.for

to compile each chunk of source code, then I link with

    link /CO fcon.obj fcon2 fcon3 fcon4 fcon5 fcon6

I know the program works, because I can compile and link it by reducing
the sizes of the biggest arrays.  But this cripples the program, and
even then it's too big for the debugger.

ANY advice would be welcomed!  I find the manuals to be almost completely
incomprehensible.  Thanks in advance.
Newsgroups: comp.lang.fortran
From: jtbell@hubcap.clemson.edu (Jon Bell)
Subject: Re: What are pointers
Organization: Presbyterian College, Clinton SC
Date: Mon, 5 Oct 1992 18:54:07 GMT

In article <1992Oct5.163909.20209@netcom.com> walt@netcom.com (Walt Brainerd) writes:
>
>Of course, this is sort of a cheap shot, but we must get used to
>the fact that standard Fortran DOES have pointers.  
>...  It's even possible that this prof is using
>an implementation of Fortran 90.

Point taken!  I haven't actually used F90 myself, but I'm looking forward to
it.  Still, if the prof really _is_ using F90, I would think he would have
given a few lectures on pointers before assigning a program which uses them.
(Maybe the guy asking the question slept through those lectures... :-) )

Jon Bell / Physics & Comp. Sci. / Presbyterian College / Clinton SC

Newsgroups: comp.lang.fortran
From: bibhas@pico.engr.mun.ca (Bibhas Bhattacharya)
Subject: Calling FORTRAN from C; Losing sleep.
Keywords: FORTRAN C
Organization: Memorial University of Newfoundland
Date: Sat, 3 Oct 1992 22:21:17 GMT


Hi,
I am working on ULTRIX platform and I want to call FORTRAN subroutines from C.
I figured out FORTRAN always passes arguements to a function by reference (by address that is). I wrote a small fortran function and made a .o file and finally a library which I linked to my C program. My cc gave a 'function undefined' error. Here are the programs. I need urgent help to solve a major problem.

******C code*****

#include<stdio.h>
main(int argc, char *argv[]){
	int sm, a1, a2;
	a1 = atoi(argv[1]);
	a2 = atoi(argv[2]);
	sum(&a1, &a2, &sm);
	printf("%d + %d = %d\n", a1, a2, sm);
}


*****FORTRAN code****

c	nice program
	call sum(A1, A2, S)
	stop
	end
	subroutine sum(A1, A2, S)
	S = A1 + A2
	return
	end
From: khb@chiba.Eng.Sun.COM (chiba)
Newsgroups: comp.lang.fortran
Subject: Re: Is this a Compiler Bug ?
Date: 4 Oct 92 12:51:33
Organization: Sun MegaSystems
NNTP-Posting-Host: chiba
In-reply-to: hybl@umbc4.umbc.edu's message of Fri, 2 Oct 1992 23:12:20 GMT


In article <1992Oct2.231220.10227@umbc3.umbc.edu> hybl@umbc4.umbc.edu (Dr. Albert Hybl (UMAB-BIOPHYS)) writes:

...tale of several unix compilers...

Stu Feldman created the "unix tradition". Those others chose not to
follow it; there is no question of who came first.

   Each time you create one of these imbroglios, you create a reason
   that works to diminish the meaning of the word "Standard."  It is

No. Everytime one gets confused about what the standard says has this
effect (magnified when shouted at the net).

The X3.9-1978 made it clear; don't use backslash if you want your code
to be Standard Compliant. If you code is not Standard Compliant don't
complain that the compiler is broken, that FORTRAN is non-portable or
that X3J3 should have the offending compiler writer tossed in Gaol.


--
----------------------------------------------------------------
Keith H. Bierman    keith.bierman@Sun.COM| khb@chiba.Eng.Sun.COM
SunPro 2550 Garcia MTV 12-40             | (415 336 2648) fax 964 0946
Mountain View, CA 94043  <speaking for myself, not Sun*> Copyright 1992

Newsgroups: comp.lang.fortran
From: zzang@stat.ufl.edu (zzang)
Subject: How to use C functions in Fortran f77?
Originator: zzang@manta
Organization: University of Florida
Distribution: usa
Date: Sun, 4 Oct 92 22:53:18 GMT

Hello,
I tried to compile a program on DEC station run with
Ultrix 4.2.
the program has some C files and also some Fortran files.
I compile the .c and .f files seperate into .o files.
then I tried to ld the .o together by using
f77 $(OBJS) -lc

but it doesn't work.
the fort can't link the .c objects.
it seems that the cc -c $<
creates different obj module format than that
of f77 -c $<.

could someone give a little idea to ld
those two different kinds of .o together?

Thanks very much !


-- 
Zhuo Zang[~{j0WA~}]
Department of Statistics
University of Florida            Email: zzang@stat.ufl.edu
Newsgroups: comp.lang.fortran
From: grasmeye@gn.ecn.purdue.edu (Joel M. Grasmeyer)
Subject: [HELP] Problems executing in Unix
Organization: Purdue University Engineering Computer Network
Date: Thu, 1 Oct 92 02:28:13 GMT

I am trying to run my executable file, and I am getting the following
two error messages:

a.out: Command not found.

Ambiguous input redirect.

Can anyone tell me what the problem might be, or what these error
messages mean?

Thank you,

Joel Grasmeyer
grasmeye@gn.ecn.purdue.edu

Newsgroups: comp.lang.fortran
From: ejh@khonshu.colorado.edu (Edward J. Hartnett)
Subject: Re: Adjustable arrays
Organization: CIRES, University of Colorado
Date: 5 Oct 92 13:40:25

In article <1992Oct5.171833.16706@magnus.acs.ohio-state.edu> cpaulse@magnus.acs.ohio-state.edu (Chris D Paulse) writes:

   In some code I'm trying to modify, there are declarations within subroutines
   for arrays of size 1, for instance

	 dimension v(1)

   These arrays seem to be ajustable, as elements with indices greater than 1
   are referenced within the subroutine.  Obviously, the declaration facilitates 
   the correct addressing of the beginning of the array.  I can't seem to find
   any reference to this sort of programming in the standard fortran texts.
   Could someone please explain what is going on here?  For each of the arrays
   declared, I want to add another dimension.  Should I make the adjustable
   dimension the last one?  Any help would be welcome.

   Chris Paulse


I can't speak specifically to your case, since I don't know much about
it. But I ran into this several times and it confused me too. The
arrays were not adjustable, the original programmer was just too
stupid/lazy to code it correctly. You are correct when you say that
v(1) will point to the start of the array, and then something like
v(12) will work in the subroutine (as long as the array was declared
in the main program as being 12 or longer), but this is, IMHO, pretty
poor programming practice, for the very reason that you have had to
post your question, and I (and probably others) have taken the time to
post a reply. Now wasn't it kind of stupid for the original programmer
to do that to us all in the interest of sxaving the 10 seconds it
would have taken to do it right? Actually it doesn't even save time
because he or she could have used v(*) for the same effect and it
would have been more clear.

My appologies if there's actually something much more complicated
going on in your code. I think the best and most time efficient thing
for you to do it to replace those declarations with ones containing
the proper array sizes, or with v(*) if their one-dimensional.

Someone here told me that the practice of using v(1) would cause
compiler errors in Fortran 90, but I don't know if that's true
(although I think it would be a good thing). Can anyone address that
question?	 
--
Edward Hartnett			ejh@khonshu.colorado.edu

Newsgroups: comp.lang.fortran
From: gumley@ltp2.gsfc.nasa.gov (Liam E. Gumley)
Subject: Re: How do I make MS Fortran 5.1 use lots of memory?
News-Software: VAX/VMS VNEWS 1.4-b1  
Organization: NASA-GSFC LTP Computing Facility Code 920.2
Date: Thu, 1 Oct 1992 20:33:00 GMT

>  * Use the new /MW option with the FL command to invoke the 
>    QuickWin library. For example: "FL /MW MYAPP.FOR" is all
>    it takes to make MYAPP a Windows-base program.
>Note also that you must use the [HUGE] attribute for large arrays
>or the huge memory model even if you are working under Windows or 
>OS/2.

You must have the following to use extended/XMS memory in Fortran under
Windows 3.1
(1) Microsoft Fortran V5.1, set up to create Windows executables 
(2) Microsoft Windows 3.1, with free memory available
    (check About Program Manager under the Help menu in Program Manager)
(3) A program compiled at the DOS command line thus:
    fl /AH /Gt /MW program.for
(4) Then get back into Windows and in Program Manager, select the Run option
    in the File menu, and type the full path and name of your executable
    program.

Note that this only works on programs which use character I/O.  There has been
talk of a library around which lets you do graphics in Windows 3.1, but I
have not seen it.  The graphics library that comes with MS Fortran 5.1 does
not work in Windows.

Cheers,
Liam.
--
Liam E. Gumley                            | Phone    : (301) 982-3700
NASA/GSFC MODIS Science Data Support Team | Fax      : (301) 982-3749
Research and Data Systems Corporation     | Internet : gumley@ltp.gsfc.nasa.gov
Greenbelt MD, USA                         | Opinions expressed here are my own!
Newsgroups: comp.lang.fortran
From: gropp@godzilla.mcs.anl.gov (William Gropp)
Subject: Re: Is this a Compiler Bug ?
Organization: Argonne National Laboratory, Chicago, Illinois
Date: Mon, 5 Oct 1992 18:41:48 GMT

A careful reading of the standard will show that there is a place for the
use of a in-string escape in a Fortran program.  Specifically, a
character constant may not involve any functions references (4.8.1 and
6.2.3).  This means that you can not use DATA to initialize a 
character variable to a value that contains any control characters, or
any character that, for whatever reason, is not allowed in a character
constant, without using an in-string escape.

Also, the definition of "processor" is deliberately very vague.  Section
B1 makes it very clear that a processor may do whatever it wants with
any "extension" (with an example that should have put to rest the 
false statement that the standard requires character*(n) to allow at 
least n >= 1320 because that is the maximum size of a conforming
Fortran statement).  Extension is defined in the broadest possible
terms.

The sad fact is that the Fortran-77 "standard" leaves so many loopholes that it
is very difficult to write truely portable non-trivial programs.  Anyone 
trying to do IO already knows this.
Bill Gropp
Newsgroups: comp.lang.fortran
Subject: Re: GMRES matrix solver
From: AFT0@ICINECA.CINECA.IT (Valeria Frontini)
Date: Wed, 30 Sep 92 09:55:50 SET
Organization: CINECA

In article <1992Sep22.192616.16744@hedmips.com>
jim@hedmips.com (Senior Research Scientist) writes:
 
>Dear fellow FORTRAN gurus,
>I am looking for source code for an iterative matrix solver known as "GMRES".
>
 The first appearance of GMRES (as I know) was in the article:
 "GMRES: A generalized minimal residual algorithm for solving nonsymmetric
 linear systems", written by Y. Saad and M.H. Schultz, published in
 SIAM J. Sci. Statist. Comp., 7(1986), 856-859.
 
 I suggest you contact the first Author, Youcef Saad, and ask him for
 the code: he has worked on that subject during these years.
 He is now at Minneapolis, you can find his e-mail address in Na-net,
 if na.saad at na-net.ornl.gov does'n work.
 
 Regards,
          Valeria Frontini
 E-mail address   : frontini at cineca.it (Internet)
                  : na.vfrontini at na-net.ornl.gov (NAnet)
                  : AFT0 at ICINECA (EARN/BITnet)
 Post-mail address: Valeria Frontini
                    C.I.N.E.C.A.
                    via Magnagnelli, 6/3
                    I-40033 Casalecchio di Reno
                    Bologna
                    Italia
 Phone            : + 39 51 598411
 Fax              : + 39 51 598472