I use fpc to compile programs intended to be run from the command line in a cmd window…
said:
Sometimes, though, new users try to start the programs by double-clicking on the exe file (application icon). When the program starts, I would like to be able to tell if they have done that, so that I can present a special error message.
One trivial solution is to drop a readline at the end of the help routine. That way the cmd window stays open until they hit enter (which you should tell them to do). Mildly annoying for people at the command line if there's only a few lines of help, but solves the problem.
Moz
