If conditions - 17/02/05 09:48 AM

Sorry if this has been reported before

if (0) fails as expected, however if (00) and if (!00) are both satisfied conditions. Try the following:

The same holds for any amount of 0s as well as when the characters -.+ prefix a string of 0s i.e. both conditions are satisfied with +00 .00 and -00

Where $1 = 00, looks like if ($1) is satisfied because it isn't interpreted numerically, on the other hand with if (!$1) it treats 00 as a number

if (0) fails as expected, however if (00) and if (!00) are both satisfied conditions. Try the following:

Code:

//tokenize 32 00 | if ($1) echo -a 1 | if (!$1) echo -a 2

The same holds for any amount of 0s as well as when the characters -.+ prefix a string of 0s i.e. both conditions are satisfied with +00 .00 and -00

Where $1 = 00, looks like if ($1) is satisfied because it isn't interpreted numerically, on the other hand with if (!$1) it treats 00 as a number