Please add these in next version please
[Implemented] not logical operatior, break, continue
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
[Implemented] not logical operatior, break, continue
Restored from previous forum. Originally posted by flim.
Please add these in next version please
Please add these in next version please
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by PB.
> So, I'm not the only one missing "NOT" logical operator ?
http://www.purebasic.com/documentation/ ... ables.html
PB - Registered PureBasic Coder
> So, I'm not the only one missing "NOT" logical operator ?
http://www.purebasic.com/documentation/ ... ables.html
PB - Registered PureBasic Coder
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by Justin.
maybe i'm wrong but does not the logical not only change from true to false and viceversa?
if so you can use this:
procedure not(var.l)
if var : procedurereturn 0
else : procedurereturn 1 :endif
endprocedure
if not(InitKeyboard())
messagerequester("","error",0)
else
messagerequester("","ok",0)
endif
maybe i'm wrong but does not the logical not only change from true to false and viceversa?
if so you can use this:
procedure not(var.l)
if var : procedurereturn 0
else : procedurereturn 1 :endif
endprocedure
if not(InitKeyboard())
messagerequester("","error",0)
else
messagerequester("","ok",0)
endif
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by tinman.
I guess you could use it as a stopgap. You should also be able to use the bitwise not operator as a logical not operator but ONLY with results of comparisons (safely) e.g.:
If ~(foo=bar)
...
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.40)
Yes, that is what it would do and your code should work. However, most people would prefer to have an operator than a function (1-3 asm instructions instead of ???? + branching).Originally posted by Justin
maybe i'm wrong but does not the logical not only change from true to false and viceversa?
I guess you could use it as a stopgap. You should also be able to use the bitwise not operator as a logical not operator but ONLY with results of comparisons (safely) e.g.:
If ~(foo=bar)
...
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + SP1, PB3.40)
-
BackupUser
- PureBasic Guru

- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm