Hi,
I tried the following piece of code which is not working.
$v=1; $f=!($v); print "**$f**\n";
The Output is ****. However, if i do
$v=0; $f=!($v); print "**$f**\n";
Output is **1**.
It looks like !(1) does not return zero whereas !(0) indeed returns 1. What can be the reason behind this and what should i do to get 0 from 1 by logical not.thanks
nghosh
Edited by Ovid. 2005-07-27.
In reply to Logical expression evaluation by nghosh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |