Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!bonnie.concordia.ca!clyde.concordia.ca!nstn.ns.ca!news.cs.indiana.edu!att!pacbell.com!ames!xenon.arc.nasa.gov!chau From: chau@xenon.arc.nasa.gov (Dung Chau) Newsgroups: comp.lang.fortran Subject: SAVEing FORTRAN variables Message-ID: <1991Feb15.000230.18585@news.arc.nasa.gov> Date: 14 Feb 91 20:12:48 GMT Sender: usenet@news.arc.nasa.gov (USENET Administration) Reply-To: chau@xenon.arc.nasa.gov Organization: NASA-Ames Research Center Lines: 18 News-Software: VAX/VMS VNEWS 1.3-4 I am looking for a tool which scans FORTRAN source code and identifies variables which should be saved. This is a simple example of a FORTRAN source code that needs to scan and insert a SAVE statement: subroutine sub (val) integer val, i data i/10/ 10 val = val * i i = i -1 goto 10 return end When subroutine sub is called the second time the value of i may not be the same. Therefore, it needs to have a SAVE statement to make i become static.