And now (it seems), the answer to my own problem x-d :
When you compile/execute a program in DarkBasic, it saves a copy of the source in C:\Windows\temp\workfile.tmp, and another in workfil2.tmp in the same folder
(this is in addition to the two backup copies created in the folder where your source is!).
(Dark Edit only creates the first of the temp files).
This path is independent of the TEMP and TMP environment variables.
The file is not deleted when Dark Basic exits.
So, unless the next user to run Dark Basic on that PC has permission to overwrite the file, he'll only be able to run your program (& therefore gets your error messages e.g. unable to load music on line 22 - most mystifying when his source is displayed & doesn't have a line 22!)
Work around: a batch file which runs Dark Edit & then deletes the temporary file. Of course, when I start more complex programs, I expect to find more temporary files needing deletion.
Preferred solution: for Dark Basic & Dark Edit to 1. delete their own temporary files; 2. use the user's TEMP environment variable to decide where to put them
Does DB work on PCs where there isn't a C:\Windows\temp? (e.g. Windows installed to a different folder; Windows NT - which defaults to c:\winnt)
P