# Save Source Files

Program source is saved in 'Save Source' files by $__BEDIT while the programmer makes changes to a program. The saving happens as follows:
1. A line of source is modified. (a flag is set indicating the source is 'DIRTY').
2. A console mode command is executed.
3. At this point all the source lines and a header are saved. The header contains the program name (if any), the time of this save and the Event(console mode command) that caused the save. The DIRTY flag is also reset so no new save is made util some source is modified.

Unless some additional backing up of 'Save Source' files is done(this is why you can enter any file name below) there are 2 days of 'Save Source' files [$__SAVE_SOURCE_CHANGES__$ and $__SAVE_SOURCE_CHANGES__$_OLD]. At save time if if the date in the header does not match todays date $__SAVE_SOURCE_CHANGES__$_OLD is deleted $__SAVE_SOURCE_CHANGES__$ is renamed to $__SAVE_SOURCE_CHANGES__$_OLD and $__SAVE_SOURCE_CHANGES__$ is created.