Page 2 of 2

Re: PB5.00b7 no longer allows testing Not with string?

Posted: Wed Nov 14, 2012 7:16 am
by Danilo
PMV wrote:Its always the same ... just because something that was never
allowed to be was just used because it seemed to work fine.
Now it is disallowed and some people are going crazy.
"If Not a" is also not allowed, according to the international PureBasic programming language standard.

Code: Select all

s.s = "string"

If s
    Debug s
EndIf

;If Not s              ; already forbidden
;    Debug "s empty"
;EndIf


a.i = 10

If a
EndIf

If Not a
EndIf
All this can be removed any time, because it is not explicitly allowed and written down in the language standard/manual/reference.
Always write "If a <> 0" and "If Not a <> 0" etc.

For me, "If a" and "If s" make both sense. The opposite of both is "If Not a" and "If Not s", which makes sense, too.

Re: PB5.00b7 no longer allows testing Not with string?

Posted: Wed Nov 14, 2012 7:29 am
by skywalk
Hard to argue that "logic" :)

Re: PB5.00b7 no longer allows testing Not with string?

Posted: Wed Nov 14, 2012 7:33 am
by chris319
"If Not a <> 0"
Why wouldn't you simply write "If a = 0"?

Re: PB5.00b7 no longer allows testing Not with string?

Posted: Wed Nov 14, 2012 7:53 am
by Danilo
chris319 wrote:
"If Not a <> 0"
Why wouldn't you simply write "If a = 0"?
Because we talk about 'Not' here. :D

Re: PB5.00b7 no longer allows testing Not with string?

Posted: Wed Nov 14, 2012 8:11 am
by chris319
Danilo wrote:
chris319 wrote:
"If Not a <> 0"
Why wouldn't you simply write "If a = 0"?
Because we talk about 'Not' here. :D
Oh, I see. I suppose you would rather write "If Not a = 0" instead of "If a <> 0".