[Implemented] EnableExplicit + CompilerIf + Not

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Dr. Dri
Enthusiast
Enthusiast
Posts: 243
Joined: Sat Aug 23, 2003 6:45 pm

[Implemented] EnableExplicit + CompilerIf + Not

Post by Dr. Dri »

Code: Select all

EnableExplicit

CompilerIf Not #PB_Compiler_Thread
CompilerEndIf
Dri
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

despite this is not a Bug-Report (a "report" should consist of some text)
I'll answer: Not is a Runtime-Operation.
oh... and have a nice day.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Kaeru Gaman wrote:despite this is not a Bug-Report (a "report" should consist of some text)
IMHO, some people doesn't speak english, or speak not so good english, so a
example is better bugreport as a text in bad english
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

I think the problem is that the compiler throws a weird message if EnableExplicit is enabled. If you turn it off, you get a more understandable message about you can't use NOT there.
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

@ts

ok, I'll respect.

@thefool

so it turns out to be the problem that a runtime-operation could not be used in a compile-time condition.. or...?
oh... and have a nice day.
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

Kaeru Gaman wrote: to be the problem that a runtime-operation could not be used in a compile-time condition.. or...?
PB Compiler wrote: Integer constant expression expected for compiler directives
yup. as you said, not is a runtime thing
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

I'd say it is a bug.
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
thefool
Always Here
Always Here
Posts: 5875
Joined: Sat Aug 30, 2003 5:58 pm
Location: Denmark

Post by thefool »

Psychophanta wrote:I'd say it is a bug.
That pb can't use NOT compile time or that the debugger goes off with a weird error message?

If the first, then its more like a feature request. PB would need to intergrate a NOT check in the pre-compiler
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

thefool wrote:That pb can't use NOT compile time or that the debugger goes off with a weird error message?
The second,
however, if PB allows Or, And and Xor for compile time, then it would allow also Not, but if PB doesn't allow any then should not be allow Not; just coherence. :wink:
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
Dr. Dri
Enthusiast
Enthusiast
Posts: 243
Joined: Sat Aug 23, 2003 6:45 pm

Post by Dr. Dri »

It's also because Not is more readable than "= #False" or "= 0"

Dri
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

It can't be considered as bug, as it is intendent (Not is (for now) a runtime only operand.
Post Reply