RE: Checkpoint

new topic     » goto parent     » topic index » view thread      » older message » newer message

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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu