-
If command
I would like to know usage of the If command. An example is,
************************************************** **************
Code:
varmult = (mult > 0) ? (0) : (1);
mult = MIN(MAX(ABS(mult), 1), MAXMULT);
if(mult == 1) varmult = 0;
if(varmult) {
varmult = MAX(1, (mult * 4) / 5);
sigmult = mult/4./SIG2FW;
}
************************************************** ***************
what is the mean of the if(varmult) ?
best wishes
serkan
-
if(varmult) is a shorter way to write if(varmult != 0). In C and C++, any variable is "true" if it's non-zero, and "false" if it's zero.
--
Mats
-
thank you very much Mats
best wishes
serkan