HDTenEightyP/NetNews huggingface dataset:
From: ggawboy@magnus.acs.ohio-state.edu (Galen F Gawboy)
Subject: Re: function name as an argument
Organization: The Ohio State University
Date: Wed, 16 Dec 1992 01:39:34 GMT

In article <1gj95eINNqgo@gap.caltech.edu> shepard@sampson.ccsf.caltech.edu (Ron Shepard) writes:
>I believe that the following is standard f77.  Note that the character
>function is declared as (*) in the main program, and is declared, and
>called, with different *(CONSTANT) values from the two subroutines.
>
>It is apparently because of the requirement of *(CONSTANT) declaration
>in the referencing subprogram that this can be done legally without
>recourse to runtime memory allocation.
>
> [ deleted an esoteric but interesting subroutine].
>
>Upon execution on a couple of machines, I get:
>
>cvar=1234567890xxxxxxxxxxxxxxxxxxxx
>cvar=12345678901234567890xxxxxxxxxx
>
>which is what I thought I should get according to the previous discussion
>in this thread.  
>
>Are there any machines that give different results?
>
>-Ron Shepard
>shepard@tcg.anl.gov

    Well I tried this code on 4 handy machines. I did not put any effort
into porting the codes since I operated under the assumption that "standard
fortran" should make it through "default" compiler options.

   Sparc station 
 cvar=1234567890xxxxxxxxxxxxxxxxxxxx
 cvar=12345678901234567890xxxxxxxxxx

   The code did not make through the compiler on the following machines.

  CRAY YMP.

  DEC station running ultrix.

  IBM rs6000 running aix.

  I guess that this just reiterates that assuming that "standard fortran" will
compile under default compiler options is always a dangerous assumption :-).

-Regards

Galen F. Gawboy

gawboy@sodium.mps.ohio-state.edu
Newsgroups: comp.lang.fortran
From: tholen@galileo.ifa.hawaii.edu (Dave Tholen)
Subject: Re: Real Programmers
Organization: University of Hawaii
Date: Sat, 12 Dec 1992 02:38:14 GMT

>         The current plan for the Galileo spacecraft is to use a gravity assist
> trajectory past Mars on the way to Jupiter.  This trajectory passes within 80
> +/-3 kilometers of the surface of Mars.  Nobody is going to trust a PASCAL
> program (or a PASCAL programmer) for navigation to these tolerances.

Sorry for posting this in a FORTRAN newsgroup, but Galileo is going nowhere
near Mars.  It just made its third and final gravity assist at Earth three
days ago.  The previous two were at Earth and Venus.  It did, however, pass
about 190 miles above the surface of the Earth; that is a rather tight
navigational tolerance.
From: dodd@mycenae.cchem.berkeley.edu (Lawrence R. Dodd)
Newsgroups: comp.lang.fortran
Subject: Re: Uglifier (was Re: Real Programmers)
Date: 16 Dec 92 06:08:59
Organization: Dept of Chemical Engineering, Polytechnic Univ, NY, USA
	<DODD.92Dec15142737@mycenae.cchem.berkeley.edu> <gay.724466320@sfu.ca>
	<1992Dec16.025109.24541@coe.montana.edu> <BzC6n8.J2G@news.cso.uiuc.edu>
NNTP-Posting-Host: mycenae.cchem.berkeley.edu
In-reply-to: ercolessi@uimrl3.mrl.uiuc.edu's message of Wed, 16 Dec 1992 05:16:19 GMT

>>>>> "furio" == furio ercolessi <ercolessi@uimrl3.mrl.uiuc.edu> writes:

  furio> did any one ever made a source code uglifier, a filter removing
  furio> all comments, renaming all variables as A1,A2,... (*),  removing all
  furio> extra spaces, replacing character constants with Holleriths, etc?
  furio> It could be a useful tool after all!  Sometimes you do not want to
  furio> give away your sources, you would like to give only the binaries
  furio> but that's impractical ... this would be a brilliant intermediate 
  furio> solution, give uglified code!  :-)

  furio> Also, sounds like a good exercise for some CS course.


Here is a SED script that does part of what you want.

here is ugly.sh:

....
#!/bin/csh
# makes file $1 ugly
sed -f ugly.sed $1 > $1.ugly
....

where ugly.sed is:

....
/^$/d
/^[ 	][ 	]*$/d
/^[cC]/d
s/^    [0-9]/     \&/
s/^[ 	][ 	]*//
s/[ 	]*\([-+\*\/=().]\)[ 	]*/\1/g
s/^\([^a-zA-Z]\)[ 	][ 	]*/\1/
s/^\([0-9][0-9]*\)[ 	][ 	]*\(.*\)/\1\2/
s/^\([0-9]\)\([^0-9]\)/\1     \2/
s/^\([0-9][0-9]\)\([^0-9]\)/\1    \2/
s/^\([0-9][0-9][0-9]\)\([^0-9]\)/\1   \2/
s/^\([0-9][0-9][0-9][0-9]\)\([^0-9]\)/\1  \2/
s/^\([0-9][0-9][0-9][0-9][0-9]\)\([^0-9]\)/\1 \2/
s/^\([a-zA-Z]\)/      \1/
s/^\([^ a-zA-Z0-9]\)/     \1/
...


The tragic (?) thing is that often I see real code that looks like it has been
uglyfied. A really good use for this script is to determine the number of line
of non-comment code in a file.

Larry
Newsgroups: comp.lang.fortran
From: lionel@quark.enet.dec.com (Steve Lionel)
Subject: Re: Help to flush buffer in FORTRAN.  (REPOST)
Organization: Digital Equipment Corporation
Date: Sun, 13 Dec 1992 22:11:57 GMT


In article <588@cfdd40.boeing.com>, lry1219@cfdd40.boeing.com 
(Larry Yeagley) writes...
>In article <1992Dec8.124335.1@lure.latrobe.edu.au>, tspdlr@lure.latrobe.edu.au writes:
> 
>   [stuff deleted]
> 
>> until it finishes.  Since my program takes many hours to complete I want
>> to force the buffered output data to the output file periodically to 
>> ensure minimal data loss in case of a system crash/failure.
>> 
>> I have thought about periodically closing and re-opening the files but 
>> don't really like this as a solution.
>> 
> 
>Consider using the command "ENDFILE (unit)" to flush output buffer of "unit".
>I have used it on several platforms and it seems to work. Typically, I use it
>when I have catastrophic program crashes - those for which no error traceback
>is available. Such crashes often leave data in the buffers. To insure that the
>data is pushed out I insert ENDFILE after each WRITE in the suspected region.
>Then, when the crash comes, I am assured that I know the last bit of data that
>was written.
> 

I don't recommend this; ENDFILE is defined as "writing an endfile record",
and if it happens to do a flush at the same time, that is an implementation
detail.  ENDFILE doesn't do a flush in VAX FORTRAN (which is what the
original questioner was using.)

Steve Lionel                    lionel@quark.enet.dec.com
SDT Languages Group
Digital Equipment Corporation
110 Spit Brook Road
Nashua, NH 03062
Newsgroups: comp.lang.fortran
From: fmconway@mtu.edu (F. Michael Conway)
Subject: line defaults
Organization: Michigan Technological University
Date: Fri, 11 Dec 1992 20:53:19 GMT

Keywords:f77, line defaults, sun

I'm having trouble dealing with output from a fortran (f77) program and I hope
someone in this group can give me some advice.

I'm working with f77 compiler on a SUN system and apparently the default is 80(?)
characters/line.  I would like to increase this to several hundred
characters/line.  This is necessary in order to enter the data, in a usuable
fashion into LOTUS.  

Here are the write and format statements.

	Write (2,42) char(09), char(09), (elem(i), char(09)
42 	   format(A,A,46(a,a))

	and

	Write (2,839) Petfr, char(09), temp, char(09), (G(1,I), char(09),i=nt)
	    format (f7.2,a,f7.2,a,70(f7.2,a))

The programs runs fine and it produces good output. But importing it into LOTUS
becomes meaningless because it starts a new line every 80 characters and not at the
end of each write statement.

	I would greatly appreciate any advice on how to correct this problem.

				Thanks,

				Mike Conway
From: khb@chiba.Eng.Sun.COM (Keith Bierman fpgoup)
Newsgroups: comp.lang.fortran
Subject: Re: elapsed time
Date: 14 Dec 92 16:41:53
Organization: SunPro
Distribution: usa
NNTP-Posting-Host: chiba
In-reply-to: bandy@netnews.jhuapl.edu's message of 14 Dec 92 18:15:47 GMT


In article <Bz9HEB.Dy5@netnews.jhuapl.edu> bandy@netnews.jhuapl.edu (Mike Bandy) writes:

,,,
   You'll have to look at the system services offered by the operating
   system under which your program runs.  Fortran, unlike C, does
   not a standard portfolio of common system services.

True for '77 but not "90".

13.9.1  Date and time subroutines

The subroutines DATE_AND_TIME and SYSTEM_CLOCK return data from the
date and real-time clock.  The time returned is local, but there are
facilities for finding out the difference between local time and
Coordinated Universal Time.

...

  DATE_AND_TIME (DATE, TIME, ZONE, VALUES)
  Optional DATE, TIME,  ZONE, VALUES

...

  SYSTEM_CLOCK (COUNT, COUNT_RATE, COUNT_MAX)
  Optional COUNT, COUNT_RATE,  COUNT_MAX
--
----------------------------------------------------------------
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
From: lu@m2c.org (Thomas Lu)
Newsgroups: comp.lang.fortran
Subject: The Sun4 Fortran compiler and DEC Fortran compiler
Date: 15 Dec 92 22:18:39 GMT
Organization: Massacusetts Microelectronics Center, Westboro, Ma.


  Greeting:

    I have one question requarding the Sun4 Fortran compiler and DEC Fortran
    compiler.  For Sun4 Fortran compiler, there is one micro function "sign".
    For DEC Fortran compiler, there is no such micro function, but there are
    four micro functions: r_sign, d_sign, i_sign and h_sign.

    I am curious about how different between Sun4 Fortran compiler "sign"
    micro function and DEC Fortran compiler micro functions: r_sign, d_sign,
    i_sign and h_sign. Or is there any micro function that DEC Fortran
    compiler can replace this "sign" micro function.  Thanks !

    PS. I do not have any of Sun4/DEC Fortran compiler manuals.

--
Thomas Lu
Massachusetts Microelectronics Center : Internet: lu@m2c.org
75 North Drive                        : Phone: (508) 870-0312 x245
Westboro, MA. 01581                   : FAX: (508)898-2275
From: D.Love@daresbury.ac.uk (Dave Love)
Newsgroups: comp.lang.fortran
Subject: Re: Real Programmers (Mel & Blackjack & RPC-4000)
Date: 16 Dec 92 18:44:53 GMT
Distribution: comp
Organization: SERC Daresbury Laboratory, Warrington, UK

Mel, and much else one should read, is in the jargon file (from GNU
repositories, for instance, as jargon2910.ascii).
From: forags@smokey (Al Stangenberger)
Newsgroups: comp.lang.fortran
Subject: Re: Real Programmers
Date: 16 Dec 92 04:59:59 GMT
Organization: U.C. Forestry & Res. Mgt.
NNTP-Posting-Host: smokey.berkeley.edu

In article <15DEC199219360045@utarlg.uta.edu> b259phl@utarlg.uta.edu (PHILIP LIPPEL) writes:
>
>> 4. Rigid field format goes hand-in-hand with model 29 keypunch program drum.
>> 
>REAL Real Programmers only use 026s. Those are the keypunches without the
>equals signs ( and a few other "useful" keys).

I think real genuine programmers would not stoop to using even an 026.
Better to use an IBM 01 (they're hand-driven, and you have to know all the
multi-punch codes to punch ... )


-- 
Al Stangenberger                    Dept. of Forestry & Resource Mgt.
forags@violet.berkeley.edu          145 Mulford Hall - Univ. of Calif.
uucp:  ucbvax!ucbviolet!forags      Berkeley, CA  94720
BITNET: FORAGS AT UCBVIOLE          (510) 642-4424  FAX: (510) 643-5438
From: spxsjm@thor.cf.ac.uk (Mr S J Morris 92)
Newsgroups: comp.lang.fortran
Subject: Reinventing WRITE...
Date: 16 Dec 92 13:23:01 GMT
Organization: University of Wales College at Cardiff
X-Mailer: Cardiff Computing Maths PP Mail Open News Gateway


I want to define a subroutine which will take the same input paramters
as a WRITE procedure; that is, I'd like to define

      SUBROUTINE WRITELN(A,B)
      
in such a way that

      WRITELN (7,100) X,Y
      WRITELN (6,*) 'HELLO THERE'
      WRITELN (*,*) 'HE''S GETTING CLEVER NOW'

all work more or less the same as the corresponding WRITE statements (by
the way, the reason I'm doing this is to open a file, find the endfile
record, append a new record and then close the file again, all in a
single call - so that I can flush the output buffer in SUN Fortran). Is
there a way of doing this, or am I being hopelessly ambitious (I've been
doing some programming in Turbo Pascal for Windows recently, where doing
this would be a doddle), or is there in fact another, easier way of
flushing the buffer on a Sun (cf. the recent thread on how to do the
same on a VAX)?

Thanks in advance for any suggestions.


-- 
Steve Morris,
Adran Ffiseg a Seryddiaeth, Coleg Prifysgol Cymru Caerdydd.
(Physics and Astronomy Dept., UWC Cardiff)
***************************************************************************
* For God so loved the world that he* Canys felly y carodd Duw y byd fel  *
* gave his only-begotten Son, that  * y rhoddodd efe ei unig-anedig Fab,  *
* whosever believes in him should   * fel na choller pwy bynnag a gredo   *
* not perish but have everlasting   * ynddo Ef, ond caffael ohono fywyd   *
* life.      (John ch.3 v.16)       * tragwyddol.      (Ioan p.3 ad.16)   *
***************************************************************************
Newsgroups: comp.lang.fortran
From: lionel@quark.enet.dec.com (Steve Lionel)
Subject: Re: VAX to UNIX (integer*2, *4)
Organization: Digital Equipment Corporation
Date: Sat, 12 Dec 1992 20:29:59 GMT


In article <Bz447J.47u@acsu.buffalo.edu>, v096my2q@ubvmsd.cc.buffalo.edu 
(ZORBA THE GEEK) writes...
>I'm having some problems reading a binary data file that was originally
>written on the vax, on the unix machine. The data consists of 2 and 4 byte 
>integers. I assume that the problem is arising because vax and unix store 
>these number differently. Does anyone have a subroutine that will convert
>vax integer*2 and integer*4 to unix format? Thanks
> 

Um, perhaps rather than "the unix machine" you meant to identify some
hardware architecture, such as MIPS, SPARC, Intel x86, etc.  Unix doesn't
define a layout for binary data; it's an operating system.  It's sort of
like the old joke "Is it faster to Chicago or by train?"

Anyway, VAX is a "little-endian" architecture, which means that the least
significant binary digits are in the lowest addressed byte.  If you
move little-endian data to a big-endian system (SPARC, some MIPS systems),
you have to reverse the order of the bytes.

				Steve
--
Steve Lionel                    lionel@quark.enet.dec.com
SDT Languages Group
Digital Equipment Corporation
110 Spit Brook Road
Nashua, NH 03062
From: zkdc05@trc.amoco.com (Kelly D. Crawford)
Newsgroups: comp.lang.fortran
Subject: Re: Real Programmers
Date: 16 Dec 92 15:57:23 GMT
Article-I.D.: trc.1992Dec16.095723
Organization: Amoco Production Company, Tulsa Research
Originator: zkdc05@church


> so are we agreed that the final version would be the following?
> 
> 85367 FORMAT(100(3H:-))/22HFOR THE HUMOR-IMPARED.)
>       WRITE(6,85367)

Since we need that carriage control character, how about this:

85367 FORMAT(10000(4H+:-)/)/24H+FOR THE HUMOR-IMPAIRED.)
      WRITE(6,85367)

The + as a carriage control means don't skip to the next line.

Plus, since we are dealing with equipment superior to what we have today,
then we probably will read this printout on a paper printer.  I've upped the
number from 100 to 10000 so we can beat the printer and paper silly...

Kelly

(By the way, this compiles and runs, but my stupid old Sparc doesn't know
that it shouldn't skip lines...)
-- 
Kelly D. Crawford             | Amoco Production Research | These are my own
kcrawford@trc.amoco.com       | 4502 East 41st Street     | opinions, not
phone: (918) 660-4043         | Tulsa, OK  74102          | Amoco's...
          >>> *** This line intentionally left blank *** <<<
From: D.Love@daresbury.ac.uk (Dave Love)
Newsgroups: comp.lang.fortran
Subject: Re: Real Programmers
Date: 16 Dec 92 18:39:38 GMT
	<1gngdqINN8b5@nz12.rz.uni-karlsruhe.de>
Organization: SERC Daresbury Laboratory, Warrington, UK

>>>>> On 16 Dec 1992 15:02:18 GMT, ig25@fg70.rz.uni-karlsruhe.de (Thomas Koenig) said:

 > Oh my god...  where's the leading space?  What sort of carriage control
 > do you use?

I presume that was a real programmer's trick to get the printer to do
something interesting.  (WHY ARE WE TALKING IN QUICHE-EATER'S LOWER CASE?)
Newsgroups: comp.lang.fortran
From: swood@vela.acs.oakland.edu (Scott Wood - EVENSONG)
Subject: getting system time (runtime) in fortran
Organization: Oakland University, Rochester MI.
Date: Tue, 15 Dec 1992 02:25:38 GMT

I have an assignment that I would like to do in fortran (don't ask me why)
but I need to be able to get run time to monitor the efficiency of the program.

I am compiling on a VAX system running a VMS OS (don't ask me why).

If you can help me out, please send me mail asap.

Thanks

swood

-- 
  Dec. 11   Opening day of Michigan Muzzleloading deer (zones 2 & 3)
  Dec. 13   Closing day of Michigan Muzzleloading deer (zone 1)
  Dec. 15   Closing day of late Michigan Elk season (permit only)
 All Month  Squirrel and Rabbit season(s) are still alive and well!!!
Newsgroups: comp.lang.fortran
From: lionel@quark.enet.dec.com (Steve Lionel)
Subject: Re: SUMMARY: CHARACTER FUNCTION as dummy argument
Reply-To: lionel@quark.enet.dec.com (Steve Lionel)
Organization: Digital Equipment Corporation, Nashua NH
Date: Tue, 15 Dec 1992 15:13:32 GMT


In article <BURLEY.92Dec15044825@apple-gunkies.gnu.ai.mit.edu>, 
burley@apple-gunkies.gnu.ai.mit.edu (Craig Burley) writes:

|>If anyone has a system that supports the code in Sample 1 (like VAX/VMS
|>FORTRAN), it'd be interesting to see how well it handled the following:
|>
|>C Sample 6
|>	CHARACTER*(*) CFUNC
|>	EXTERNAL CFUNC
|>	CALL X (CFUNC)
|>	PRINT *, 'Done!'
|>	END
|>C
|>	SUBROUTINE X (CFUNC)
|>	CHARACTER*(*) CFUNC
|>	EXTERNAL CFUNC
|>	PRINT *, 'Try this:'
|>	PRINT *, CFUNC()
|>	PRINT *, 'Now try this:'
|>	CALL Y (CFUNC(), CFUNC())
|>	END
|>C
|>	SUBROUTINE Y (ARG1, ARG2)
|>	CHARACTER*(*) ARG1, ARG2
|>	PRINT *, ARG1(1:10), LEN (ARG1)
|>	PRINT *, ARG2(1:10), LEN (ARG2)
|>	END
|>C
|>	CHARACTER*(*) FUNCTION CFUNC ()
|>	INTEGER I,J
|>	CHARACTER C
|>	SAVE I,C
|>	DATA I/50/, C/'A'/
|>	DO 10 J = 1, I
|>	   CFUNC(J:J) = C
|>10	CONTINUE
|>	I = 2 * I
|>	C = CHAR (ICHAR (C) + 1)
|>	END
|>
|>

VAX FORTRAN disallows the CHARACTER*(*) declaration for something that is
not a formal argument; this seems to me the only correct choice.
--

Steve Lionel                    lionel@quark.enet.dec.com
SDT Languages Group
Digital Equipment Corporation
110 Spit Brook Road
Nashua, NH 03062
From: exn@bk302.exnet.msk.su (Volkov Igor Nikolaevich)
Newsgroups: comp.lang.fortran
Subject: Re: Re: Vax Fortran Things
Date: Wed, 09 Dec 92 17:43:45 +0200
Distribution: world
Organization: AO Kalumb
Reply-To: exn@bk302.exnet.msk.su

>>I am charged with converting a number of existing Fortran programs
>>(I didn't write them) to C via f2c.  My long term goal is to re-write
>>them in c (No slam intended to fortran, I just happen to be a c
>>programmer) but am having some problems.
>>
>>Statements like this:
>>
>
>Preprocess this somehow (I don't have a tool for it) to look like:
>
>>!     TYPE 85
>       write( 6, 85 )
>
>>85   FORMAT (//' OUTPUT FILE NAME = ', $)
>
>>!     ACCEPT 70, OUTFILE
>       read( 5, 70 ) outfile
>
>>
>>give f2c fits.  I know what this is supposed to do, but how do I
>>fix it so it is possible to use f2c with code?
>>
>
>Make it standard FORTRAN.
>--
>Michael Lemke

        You forget about "$" - that is not Standart Fortran.
        My advise - delete it:

85      format('OUTPUT FILE NAME = ')

-----------
Volkov Igor
Moskow Government Technical University
aspirant
From: IFF291@DJUKFA11.BITNET (Stephan Petersen)
Newsgroups: comp.lang.fortran
Subject: Linking Borland C w/ Lahey Fortran possible?
Date: 15 Dec 92 15:30:16 GMT
Organization: Forschungszentrum Juelich


Hi there,

does anybody by chance know whether Lahey F77L - Fortran V4.0.2 (MS-DOS)
object code can be linked with Borland C++ object code? If not, which
other MS-DOS C-compiler does allow for it?

Thanks for any help,
Stephan





+------------------------------------------------+
| Stephan Petersen                               |
|                                                |
| Bitnet/EARN: IFF291@DJUKFA11                   |
| Internet:    IFF291@zam001.zam.kfa-juelich.de  |
+------------------------------------------------+
Newsgroups: comp.lang.fortran
From: bandy@netnews.jhuapl.edu (Mike Bandy)
Subject: Re: Need help with named common blocks
Organization: JHU/Applied Physics Laboratory
Distribution: comp
Date: Mon, 14 Dec 1992 18:21:25 GMT

jumper@fritz.catt.ncsu.edu (Michael Lanham) writes:

>Hi,

>I need a moderate tutorial on named common blocks. Let me describe what I have
>and then you can tell me how to think of it.

>I have several program src files.  In the file with the BLOCK DATA segment,
>the COMMON block is named and shaped as follows:

>      IMPLICIT INTEGER (A-Z)
>      COMMON/SHARE1/TABLE(1770),NOPU(54),FLHS(54),UNUSE0(122),
>     -           XLATE(127),KWT1(50),KWT2(50),STACK1(50),STACK2(50),
>     -           SYMBOL(8),VALUE(8),UNUSE5(16),CHAR(80),VALUXY(12),
>     -           LISTX(61),INTERX(70),SYNTAB(2,26),CHARX(26),TAG(50),
>     -           (50)



>In most of the other modules the common block share1 is entered the same way.
>Now I found an additional SHARE1 that is different.

>      COMMON/SHARE1/NSVT(1000),OSVT(1000),
>     -             OPND(3),LINE(133),UNUSE3(574),
>     -             OUTTAB(50,4),SUPP(100,2),SYMBL(2),UNUSE2(18)

>Is an accurate way of thinking of SHARE1 is the first declaration plus the
>second concatenated to the end of the second?  I need to know this so I can
>correctly build my union in C to accurately reflect the SHARE1 structure.

Yes, if what you're saying is that both definitions occur in the same
Fortran source module.

IMHO this is bad style.  Perhaps as you convert these, you can pull the
definition out into a seperate file and INCLUDE it into each source
file that needs to reference the block.  Now you're maintaining a
single copy of the common block.

-- 

	Mike Bandy
	bandy@aplcomm.jhuapl.edu
	Johns Hopkins University / Applied Physics Lab
Newsgroups: comp.lang.fortran
From: michael@chpc.utexas.edu (Michael Lemke)
Subject: Re: function name as an argument
Organization: The University of Texas System - CHPC
Date: Tue, 15 Dec 92 06:42:08 GMT

In article <1992Dec15.061743.20060@chpc.utexas.edu> michael@chpc.utexas.edu (Michael Lemke) writes:
>In article <1gj95eINNqgo@gap.caltech.edu> shepard@sampson.ccsf.caltech.edu (Ron Shepard) writes:
>>I believe that the following is standard f77.  
>
>	I don't think so -- see below.
>
[...]
>>      program dumb
>>      character*30 cvar
>>      character*(*) cfun
>>      external cfun
[...]

>>Upon execution on a couple of machines, I get:
>>
>>cvar=1234567890xxxxxxxxxxxxxxxxxxxx
>>cvar=12345678901234567890xxxxxxxxxx
>>
>>which is what I thought I should get according to the previous discussion
>>in this thread.  
>>
>>Are there any machines that give different results?
>
>	Yes, VAX/VMS:
>
>$ for x
>%FORT-F-ADJLENUSE, Passed length character name used in invalid context 
> 	[CFUN] in module DUMB 
>%FORT-F-ENDNOOBJ, IO$DUC0:[MICHAEL]X.FOR;2 completed with 1 diagnostic - object 
>deleted
>
>So what junky Fortran took this?
>

I knew the Sun would take it!  Just tried.  That crap can also modify a 
parameter like so:

	Program dumber
	parameter( j = 77 )

	call foo( j )

	type *, j
	end

	subroutine foo( j )

	type *, 'foo> ', j

	j = 99

	type *, 'foo> ', j

	end

Prints something like:

foo> 77
foo> 99
77

At least J doesn't get changed in the main program.  I think this should
crash at the assignment to J in FOO.  What say the Fortran lawyers here?

Michael
-- 
Michael Lemke
Astronomy, UT Austin, Texas
(michael@io.as.utexas.edu or UTSPAN::UTADNX::IO::MICHAEL [SPAN])
Newsgroups: comp.lang.fortran