View Single Post
Old 22 October 2021, 08:49   #4
zooperdan
Registered User
 
Join Date: Sep 2021
Location: Norway
Posts: 20
Quote:
Originally Posted by Thomas Richter View Post
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

Last edited by zooperdan; 22 October 2021 at 08:58.
zooperdan is offline  
 
Page generated in 0.05181 seconds with 11 queries