Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Data Storage and Reproduction Cont.
: : There are several ways:
: : - a variable in a configuration file
: : - using the time as filename
: : - write a function which checks if a file exists.
: You could use the time idea with a date in front, so that it's practically impossible to EVER get a duplicate file.
: Think of a filename stored as:
: yy = 2 digit year
: m = 1-9,A-C (1-12)
: d = 1-9,A-W (1-31)
: h = 0-9,A-N (0-23)
: mm = 2 digit minute
: s = 0-9,A-V (0-30) *NOTE* This uses Second/2 ****
: xxx = your choice of extension
: This would be pretty easy to code and would only duplicate after 100 years or if the program was run 2 times in 2 seconds (both unlikely).
: Phat Nat
I like the date and time idea, but I cant see how I would make all the time variables (h, m, s, hs) fit into one single string variable which I could then call up as 'variable'.txt
variable:=(h, m, s, hs) doesnt work. Adding the date makes it even more coimplicated but then again, if you come up with an answer it will probably be obvious. I think Im starting to give up on programming :)