All options via IDE as well as through code

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

All options via IDE as well as through code

Post by blueznl »

I don't know it this is even feasible, and I'm not even sure it is entirely necessary, but it just feels wrong :-)

Some options can only be turned on / off through the IDE (for example the DirectX subsystem), whilst other options can only be switched through code (EnableExplicit).

Wouldn't it make more sense to be able to set them both ways? (Ah yes, I know there's always the issue of priority, well, I'd assume that the IDE would give default settings, which would then be overridden by statements in the code.)

I know this probably isn't that simple, but it would just make it look just a little tad more professional. My 2 cents etc. etc. etc.

(On a priority scale from 0 to 10 this one ranges a 1 I guess :-) even in my own opinion :-))
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

Re: All options via IDE as well as through code

Post by Josh »

i would prefer, to make the setting EnableExplicit as an option in the compiler options. i never used DisableExplicit and for me, i don't see any circumstance to need this.

additionally i would like a setting, to forbid default types for untyped variables. on the one hand i have EnableExplicit to forbit variables without define, at the other hand i can avoid a part of this safety device with default variables. i know, to use default types is very popular, but you can produce bad aftermaths, maybe thousands of lines later.
sorry for my bad english
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Re: All options via IDE as well as through code

Post by freak »

Options like the subsystem or unicode mode require a compiler restart to take effect. How would you do that from code?

Also, what would be the point of having two separate ways to configure the same thing? Which should be used if the settings contradict each other?
quidquid Latine dictum sit altum videtur
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: All options via IDE as well as through code

Post by blueznl »

> (Ah yes, I know there's always the issue of priority, well, I'd assume that the IDE would
> give default settings, which would then be overridden by statements in the code.)

:-)

Like I said, I can imagine it would not be logical, easy, or whatever, but it just feels a bit funny that DirectX is a compiler option, whilst enable excplicit is a statement, don't you think so?
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: All options via IDE as well as through code

Post by Trond »

Like I said, I can imagine it would not be logical, easy, or whatever, but it just feels a bit funny that DirectX is a compiler option, whilst enable excplicit is a statement, don't you think so?
The compiler options works for the entire exe file, the statement options can be turned on and off for portions of the code (EnableExplicit/DisableExplicit).
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6166
Joined: Sat May 17, 2003 11:31 am
Contact:

Re: All options via IDE as well as through code

Post by blueznl »

Ahhhhh! Okay, now that makes sense!
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
User avatar
Rescator
Addict
Addict
Posts: 1769
Joined: Sat Feb 19, 2005 5:05 pm
Location: Norway

Re: All options via IDE as well as through code

Post by Rescator »

Yeah! But I still want a Global Default option for EnableExplicit :P

The only times then that I'd use DisableExplicit wold be when I'm just testing and too lazy to to a Define,
actually that amounts to almost the same amount of work so even quick tests I'd do would have properly define variables, hmm nice... ;P
User avatar
PureLeo
Enthusiast
Enthusiast
Posts: 221
Joined: Fri Jan 29, 2010 1:05 pm
Location: Brazil

Re: All options via IDE as well as through code

Post by PureLeo »

I guess it would drive Windows crazy if we made a program like this:

EnableDirectX

NowDisableIt

EnableAgain

ISaidDisable!

:mrgreen:
Post Reply