Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Snippets For Newcomers - 7 Loading And Saving Data To Files

Author
Message
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 13th Aug 2005 21:38 Edited at: 14th Aug 2005 21:21
This is a DB Classic Snippet and collects some data from the user, creates a matrix and displays it with a simple menu.

You can then randomize the matrix with the R option on the menu or flatten it with the F option.

When you have the one you want to keep, the P option will put an obelisk shape in the middle so when it's loaded back in, you can differentiate it from a normally random created matrix.

S saves the current data to a file. When saved, flatten the matrix (or you won't see any difference when you load it back in), and use L to load the saved data back in.

The save and load procedures can be adapted to save ANY data in your programs that is stored in variables.

All you have to do is make sure that your Load routine loads the data back into your program in EXACTLY the same order as it is saved or it won't work. Arrays can be saved in For...Next loops.



TDK_Man

Login to post a reply

Server time is: 2024-09-24 01:22:28
Your offset time is: 2024-09-24 01:22:28