Hello,
when use 'Not' in my code it is believed to be a variable. And since I use 'EnableExplicit' nothing happens. Is this a bug just in my copy of PB4 or general ?
BTW, I use '~' as a replacement.
Thanks
'Not' is not working
-
- Enthusiast
- Posts: 196
- Joined: Tue Sep 30, 2003 4:32 pm
- Location: The Netherlands
What is not working?
NOT works really:
Uncomment and comment the two line and see for yourself.
Jan V.
NOT works really:
Code: Select all
EnableExplicit
Define Mess.l, Line.s
OpenConsole()
mess.l = #False
; mess.l = #True
Line.s = " test bla : bla test"
If Not Mess.l
If FindString( Line.s, ":", 1)
PrintN( "!!" + Line.s + "!!<o><o>")
EndIf
EndIf
Input()
End
Jan V.
Life goes to Fast, Enjoy!!
PB 4 is to good to be true, wake up man it is NOT a dream THIS is a reality!!!
AMD Athlon on 1.75G, 1Gb ram, 160Gb HD, NVidia FX5200, NEC ND-3500AG DVD+RW and CD+RW, in a Qbic EO3702A and Win XP Pro SP2 (registered)
PB 4 is to good to be true, wake up man it is NOT a dream THIS is a reality!!!
AMD Athlon on 1.75G, 1Gb ram, 160Gb HD, NVidia FX5200, NEC ND-3500AG DVD+RW and CD+RW, in a Qbic EO3702A and Win XP Pro SP2 (registered)
Hello Jan Vooijs,
thanks for your reply. Yes, your code works. But try this:
This leads to an error message. what's wrong with the code?
Regards
thanks for your reply. Yes, your code works. But try this:
Code: Select all
wTune = #False
wTune = Not wTune
Regards
-
- PureBasic Expert
- Posts: 4229
- Joined: Sat Apr 26, 2003 8:27 am
- Location: Strasbourg / France
- Contact:
NOT = LOGICAL NOT (use with IF/WHILE/UNTIL...)drahneir wrote:Hello Jan Vooijs,
thanks for your reply. Yes, your code works. But try this:
This leads to an error message. what's wrong with the code?Code: Select all
wTune = #False wTune = Not wTune
Regards
~ = BITWISE NOT (use with numbers, like Flags = Flags & ~RemoveFlag)
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
- Joakim Christiansen
- Addict
- Posts: 2452
- Joined: Wed Dec 22, 2004 4:12 pm
- Location: Norway
- Contact:
You could use:
Code: Select all
wTune = #False
wTune = wTune!1
I like logic, hence I dislike humans but love computers.
or look this:
Code: Select all
Macro Is(Condition)
(#False Or (Condition))
EndMacro
wTune = Is( Not #False)
Debug wTune
Missing boolean type
Pure Basic has no boolean type so operations such as a = not b become a bit... daunting
The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in; we're computer professionals. We cause accidents. (Nathaniel Borenstein)
http://www.wirednerd.com
http://www.wirednerd.com