dimanche 4 janvier 2015

if statement and functions

I sometimes see code that looks like this:



if(!Somefunction()){
// ...
}else{
// ...
}


I am more of a java developer and the only way I know the above statement holds is if the function returns a true or false at the end.


Does every function that is used in this format have to return a true or false? Or does this mean if the function is successfully executed?





Aucun commentaire:

Enregistrer un commentaire