Quote:
Originally Posted by Thomas Richter
Huh? What do you mean "running in the editor"? What is "the editor", and how can an editor run a program?
AmigaOs "only" has two execution environments, the shell and the workbench.
|
Well, by editor I of course mean the Blitz Basic editor. The one you do the coding in and then compile and run.
I want to be able to detect in code whether the program was run from the editor or if it's a compiled program started from either WB or CLI. This way I can i.e show some debug info, allow certain keypresses/cheats etc. while developing.
The ideal would be a preprocessor directive which only includes and executes a code segment if it's compiled/ran from within the Blitz Basic editor. When you compile those segments are not included in the build. This is a common feature of most development environments.
Example
#IF EDITOR
; some code which is only compiled and executed while in the editor
#ENDIF