04-06-2006 01:25 AM
04-07-2006
12:07 PM
- last edited on
04-27-2025
10:11 PM
by
Content Cleaner
04-07-2006 01:39 PM
Thanks for your suggestion. However, the main problem is not how to read and write together but how to compare the data. I started by writing and reading vi becuase I wanted to insolate every part of my program, be sure it works and then build on top of it. The complete application should do something like:
--Open two files, one for new data, one for repeted data
-- User enters data -> a key as integer and some string
-- compare the new key with ALL the keys already stored in the file.
-- if the file is empty or no key is found in the file, write the data in the file for new data
-- If the key is repeted, write the data in the file for repeted data
-- Keep doing this until the user stops the application.
What I really need is to be able to compare the recent entered data to what was entered before. I chose to save data in a datalog because it seemed the best solution and because I also needed to store the date and time. However, if there is any other way to store the data and compare it, please let me know. I tried arrays and clusters by themselves but it wasnt easy. Datalogs worked fine storing data but now comparing is too hard because I dont know how to read the file, record by record while comparing it to the new data I just got.
I hope this is a little bit clearer!
04-08-2006 12:58 AM
I think I finally got what I needed it. This is the vi. If anybody has suggestions on how to make it better or more efficient, please let me know. I think it is very slow but I dont know if this is normal or I can make it better.
Thanks!