[J3] [EXTERNAL] [BULK] Re: Consistency in conversion functions

Van Snyder van.snyder at sbcglobal.net
Tue Apr 4 20:52:12 UTC 2023


On Tue, 2023-04-04 at 19:09 +0000, Jeff Hammond wrote:
> 
> 
> 
> On 4. Apr 2023, at 21.59, Van Snyder via J3 <
> j3 at mailman.j3-fortran.org> wrote:
> 
> 
> > 
> > 
> > 
> > 
> > External email: Use caution opening links or attachments
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > On Tue, 2023-04-04 at 16:13 +0000, Clune, Thomas L. (GSFC-6101) via
> > J3 wrote:
> > >  
> > > I would not be opposed to the additional intrinsics suggested
> > > here, but I’m sure it would be rather far down my list of
> > > priorities.
> > 
> > 
> > 
> > Every new intrinsic procedure inserts a new opportunity for
> > conflict with existing codes.
> > 
> > 
> 
> 
> 
> 
> 
> 
> 
> Do you have any evidence that codes are defining procedures named
> INTEGER() that take the same arguments as INT() or that any
> programmer has ever thought it was a good idea to name a procedure
>  the same as a language intrinsic type?

The history of the committee going back to the development of FORTRAN
77 is that this was always a concern. I can't speak for codes other
than mine, but people used to complain about this problem.

The solution recommended, even in FORTRAN 77, was to declare every
procedure EXTERNAL so that if a revision of the standard added a new
intrinsic that happened to be the same as one of your procedures there
wouldn't be a conflict. But people had codes, some quite large, that
began their lives before that recommendation, and people didn't always
follow that advice in new codes. I remember Stan reporting that
McNeill-Schwendler, one of DEC's biggest customers, was vehement about
this.


> Fortran has no reserved names and yet somehow the language has
> managed to evolve without the world coming to an end. The possibility
> of theoretical problems isn’t a reason to refuse to solve
>  real problems. 
> 
> 

I don't agree that having to write INT is a "real problem." You could
write an external procedure named INTEGER that does what you want.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20230404/c9c7f85d/attachment.htm>


More information about the J3 mailing list