Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!ncar!bierstat.scd.ucar.edu!fred From: fred@balzac.scd.ucar.edu (Fred Clare) Newsgroups: comp.lang.fortran Subject: Re: Is this a "feature"? Message-ID: <11565@ncar.ucar.edu> Date: 28 May 91 18:36:01 GMT References: <1991May23.160841.402@ac.dal.ca> <24424@lanl.gov> <3590@charon.cwi.nl> Sender: news@ncar.ucar.edu Reply-To: fred@balzac.scd.ucar.edu (Fred Clare) Organization: Scientific Computing Division / NCAR, Boulder Co. Lines: 31 In article <3590@charon.cwi.nl>, dik@cwi.nl (Dik T. Winter) writes: > In article <24424@lanl.gov> jlg@cochiti.lanl.gov (Jim Giles) writes: > > In fact, > > I seem to remember that in the 66 standard the definition status of a > > local variable across calls was not even mentioned. > But it is. In the section about variables that become *undefined* when > executing a return statement. (From memory: if a variable is assigned to > within a routine its value becomes undefined when executing a return > statement.) > -- > dik t. winter, cwi, amsterdam, nederland > dik@cwi.nl -- From section 10.2.6 of Fortran 66: An entity not in common except for a dummy argument or the value of a function may be initially defined. Such entities once defined by any of the rules previously mentioned, remain defined until they become undefined. If such an entity is in a subprogram, the completion of execution of a RETURN statement in that subprogram causes all such entities and their associates at that time (except for initially defined entities that have not been redefined or become undefined) to become undefined. ---------------------------------------------------------- Fred Clare * NCAR (Nat'l Center for Atmospheric Research) PO Box 3000 * Boulder, CO 80307-3000 * 303-497-1284 fred@ncar.ucar.edu