Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!bionet!agate!saturn!ssyx.ucsc.edu!sirkm From: sirkm@ssyx.ucsc.edu (Greg Anderson) Newsgroups: comp.sys.atari.st Subject: Re: Self Modifying code Keywords: C, atari st Message-ID: <9531@saturn.ucsc.edu> Date: 27 Oct 89 05:35:12 GMT References: <46768dca.14a1f@force.UUCP> Sender: usenet@saturn.ucsc.edu Reply-To: sirkm@ssyx.ucsc.edu (Greg Anderson) Organization: UC Santa Cruz; Division of Social Sciences Lines: 20 In article <46768dca.14a1f@force.UUCP> covertr@force.UUCP (Richard E. Covert) writes: >... he would like to >make his code self-modifying. IN particular he would like >to save the state of various buttons that he uses. > >1) Write the data to an external file (*.CFG), but now >you have to maintain a PRG, a RSC and a CFG file. Clumsy. Far from clumsy, this solution is so elegant and simple it is a wonder you would even consider anything else. Some advice: 1. Keep the CFG info in a human-readable (ASCII) format. 2. If the CFG file doesn't exist, create it. ___\ /___ Greg Anderson ___\ /___ \ \ / / Social Sciences Computing \ \ / / \ /\/\ / University of California, Santa Cruz \ /\/\ / \/ \/ sirkm@ssyx.ucsc.edu \/ \/