Hi all,
happy my topic got some interrest!
let me try to explain, what was my intention:
I wanted to have conditionnal compilation according the state of -s console / gui used at compile time
i know it is only interresting for windows but I think, it"s still an important os...
As you have also discussed, it is related to "trace" facility, because the console can give you the opportunity to follow the execution with print informations.
So you can imagine the code has some print lines to do it, interresting when you test your code, but not when you use the prog.
if you don't have explicit define to know, the print is always executed (in dummy way) even not in console mode ( i mean also even without visible gui), that impacts the speed execution, and the size of the executable for nothing, with conditionnal compilation we can avoid that.
other point, the sleep ( without time value) found often at the end of many test programs,
if by mistake you compile with -s gui the program will never close when executed, you don't see it still executing, you have to kill the process...
and whith some ide, it is not detected until the fbc link time, (error 1 in most case)
not very easy for non expert people ( like myself , i've felt often into that trap)
so that why I was requesting ( and now it's done) that evolution
The only thing I'd like to discuss is the name. I'd rather call it __FB_SUBSYSTEM__
i don't like that proposal because nobody care about SUBSYSTEM, it's for me expert level again
it's different approach as done with outpout "exe,dll,lib,obj" ;
these defines are not groupped into only 1 and test the string to know what state it is
i prefer and it is simpler to understand because same philosophy as "exe,dll,lib,obj"
and i think the names __FB_CONSOLE__ and __FB_GUI__ are much more understandable (it is as you use -s console /gui)
last point, the code to make it
as you probably have seen, it's quite simple, i just mirrored the approach done with "exe,dll,lib,obj", so easy to maintain : not big headeck.
So, i'm on the same position as adele ( thanks for support),
it is done, it is simple, it can give something for some users, it does not give problems for users not using it...
lets implement it now on the rolling fbc version!