Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ecsvax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!mcnc!ecsvax!dgary From: dgary@ecsvax.UUCP (D Gary Grady) Newsgroups: net.lang Subject: Re: Constants in subroutine calls Message-ID: <483@ecsvax.UUCP> Date: Fri, 11-Jan-85 12:59:43 EST Article-I.D.: ecsvax.483 Posted: Fri Jan 11 12:59:43 1985 Date-Received: Sun, 13-Jan-85 09:20:46 EST References: <606@spuxll.UUCP> Organization: Duke U Comp Ctr Lines: 25 <> Warning: pathetic apology follows; overly sentimental readers may want to skip... WRONG!! I was WRONG!!!!! Mea culpa! I had claimed that existing FORTRAN compilers allow a constant to be passed as argument to a subprogram without that constant being damaged if it is modified within the subprogram. The FORTRAN compiler I used years ago behaved nicely in that regard. I have now discovered (by trying it out) that IBM's current VS FORTRAN compiler DOES allow you to make 1=2 and other horrors. I continue to consider that silly behavior. The runtime overhead of copying constants into a work area is trivial. But the fact remains that I was dead wrong, and wrong due for the simple reason that I fired off a response because I was "sure" of something before I tested it. In the future I will attempt to do better. I await suggestions for pennance. -- D Gary Grady Duke U Comp Center, Durham, NC 27706 (919) 684-3695 USENET: {seismo,decvax,ihnp4,akgua,etc.}!mcnc!ecsvax!dgary