public static function PHPExcel_Calculation_Logical::NOT in Loft Data Grids 6.2
Same name and namespace in other branches
- 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Calculation/Logical.php \PHPExcel_Calculation_Logical::NOT()
* NOT * * Returns the boolean inverse of the argument. * * Excel Function: * =NOT(logical) * * The argument must evaluate to a logical value such as TRUE or FALSE * * Boolean arguments are treated as True or False as appropriate * Integer or floating point arguments are treated as True, except for 0 or 0.0 which are False * If any argument value is a string, or a Null, the function returns a #VALUE! error, unless the string holds * the value TRUE or FALSE, in which case it is evaluated as the corresponding boolean value * * @access public * @category Logical Functions *
Parameters
mixed $logical A value or expression that can be evaluated to TRUE or FALSE: * @return boolean The boolean inverse of the argument.
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Calculation/ Logical.php, line 212
Class
- PHPExcel_Calculation_Logical
- PHPExcel_Calculation_Logical
Code
public static function NOT($logical = FALSE) {
$logical = PHPExcel_Calculation_Functions::flattenSingleValue($logical);
if (is_string($logical)) {
$logical = strtoupper($logical);
if ($logical == 'TRUE' || $logical == PHPExcel_Calculation::getTRUE()) {
return FALSE;
}
elseif ($logical == 'FALSE' || $logical == PHPExcel_Calculation::getFALSE()) {
return TRUE;
}
else {
return PHPExcel_Calculation_Functions::VALUE();
}
}
return !$logical;
}