RE: Checkpoint
- Posted by Lucius Hilley <Lucius_Hilley at Bigfoot.com> Nov 18, 2001
- 408 views
If all the variables for the program are processed through a single sequence then that sequence can be saved to file at any time. Another possibility is for only the variables that you feel are crucial for saving to be stored in a single sequence for easy saving. A better method uses a C like capability. Being able to store a pointer to the variables that you want to save in a sequence. Then you could go through that sequence saving the value of each variable that you have a pointer to. Also you could make global the variables that you want to save. Then put them in a save_var() type of routine that writes those variables to file when desired. None of the above solutions take into account the current point of execution. That would have to be stored in a variables to be written to file. Also, the program would have to be designed to be able to skip to the point at which it was last saved. Good luck on that last part. Recursive calls can be very difficult to jump back into. Lucius L. Hilley III