Path: utzoo!attcan!uunet!ginosko!aplcen!haven!umbc3!mbph!hybl
From: hybl@mbph.UUCP (Albert Hybl  Dept of Biophysics  SM)
Newsgroups: comp.lang.fortran
Subject: Re: Scope of intrinsics
Summary: How to improve portability--validation with registered trade-mark
Message-ID: <603@mbph.UUCP>
Date: 14 Aug 89 22:45:12 GMT
References: <1989Aug8.232014.9265@agate.berkeley.edu>
Organization: University of Maryland, School of Medicine, Baltimore, MD 21201
Lines: 55



In message <1989Aug8.232014.9265@agate.berkeley.edu> from
jerry@violet.berkeley.edu, Jerry Berkman writes:

>According to the 1977 standard, pages 18-1 & 18-2, the symbolic
>name of an external function is a global entity while the
>symbolic name of an intrinsic function is a local entity.
>And according to section 18.1.2:
>
>	"a symbolic name that identifies a local entity may,
>	 in a different program unit, identify an entity of
>	 any class that is either local to that program unit
>	 or global to the executable program."
>
>..., I expect the following program to print a 4 and a 2:

  [ Program deleted ...]

>It does using 4.3 BSD f77 on a VAX or DEC's VMS FORTRAN compiler.
>However IBM's VS FORTRAN and Cray's CFT77 issue a warning during
>loading and then print a 2 followed by a 2!  I.e. they do not
>distinguish the intrinsic from the external!

I ran his program on an AT&T 3B2/400, an AT&T 3B1 and
an IBM PC/AT with the following results:

MACHINE:  AT&T 3B2/400 using FORTRAN 77 XLA+  
OUTPUT:  a 4 followed by a 4  --  OOPS seems to ignore the EXTERNAL

MACHINES:  AT&T 3B1 using SVS FORTRAN and IBM PC/AT using RM FORTRAN
OUTPUT:  a 4 followed by a 2  

Summary:  Of seven implementations, four gave the expected results,
two ignored the intrinsic and one ignored the external index function.
Jerry has just shown that not even STANDARD FORTRAN is portable!
Unfortunately, many such examples can be documented.  What happens to
a standard after X3J3 has finished their work?  Why isn't FORTRAN 77
more portable?

A STANDARD CONFORMING FORTRAN compiler should NOT be released
without first passing a suite of validation tests.  Who should
be responsible for the validation?  Certainly not CBEMA!
How about the NBS?  Approved implementations ought to be dated
and stamped with a registered trade-mark.  Let me suggest that
a cartoon of Magicicada septendecim be drawn and registered as
the symbol of a validated FORTRAN implementation.

----------------------------------------------------------------------
Albert Hybl, PhD.              Office UUCP: uunet!mimsy!mbph!hybl
Department of Biophysics       Home   UUCP: uunet!mimsy!mbph!hybl!ah
University of Maryland                CoSy: ahybl
School of Medicine
Baltimore, MD  21201                 Phone: (301) 328-7940 (Office)
----------------------------------------------------------------------