Boolean limitations
#1

Can i use 0 insteady of false in a boolean?
Reply
#2

No, whats the problem with true and false i know 0 and 1 is less typing but not by much.
Reply
#3

Is it adviced to call if(ploggined == false).
Because i use it like this if(ploggined == 0).
Reply
#4

Quote:
Originally Posted by Akeem
Посмотреть сообщение
Is it adviced to call if(ploggined == false).
Because i use it like this if(ploggined == 0).
You can do this for both bool and int and its also less typing:

PHP код:
if(!ploggined//is like ploggined == false and for int like ploggined == 0
if(ploggined//is like ploggined != false and for int like ploggined != 0 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)