A WARNING FOR USERS OF DEVPAC V3 and HiSoft LATTICE C ===================================================== By Peter Hibbs This note details a bug (well I think it's a bug) in DevPac Version 3 and also in the Lattice C editor which can lead to the loss of your source code, as I found to my cost. Unfortunately the problem does not show itself until it is too late. Referring to the DevPac 3.1 assembler first. Let's suppose you have a large source code file in memory and you have just added a large chunk of new code which may (or hopefully may not) crash when it is run. Naturally you would save it to disk first before you run it. I normally assemble the code to check that there are no syntax errors before I save the file to disk. In DevPac V3, on the successful completion of the assembly, the screen displays the 'messages' screen which shows the number of bytes used, time taken, etc, etc. Before you run your program to test it you would first save the source code to disk by pressing ALT S (or use the drop down menu) just in case the program crashes when it is run. Let's suppose you try and save it while the 'messages' screen is still displayed (DevPac allows this) instead of switching back to your source code, the file selector appears with the name of your source code file showing in the filename box as usual and you could be forgiven for thinking that you were saving that file to disk. WRONG !! The file that is saved is the text currently displayed on screen, i.e. the 'messages' information and what's more, it overwrites your program source file on disk since it uses the same filename. You can easily check this if you are using a third party file selector which can display the file sizes of files on disk, the saved file will now be only a few hundred bytes depending on the size of the message screen. If you now run your program and it crashes badly so that you have to reboot the machine, you have lost your source file data. The same applies, of course, if you finish a programming session by rebooting the computer (a dangerous practice) instead of exiting DevPac with the 'quit' option which allows you to save any unsaved files. There are two things you can do to ensure your data is not lost. Firstly make sure the 'back-up' option is enabled when you save files. This will not help, of course, if you should save a file twice but if you should accidentally save the messages information and then crash the program, the .BAK file should be still OK. The safest way is to ALWAYS make sure that whenever you save a file to disk, you are actually looking at the correct source file on screen. This is also relevant if you have more than one source file open, it is very easy to save the wrong one if they look similar. The above notes also apply to HiSofts Lattice C editor/compiler. YOU HAVE BEEN WARNED !