# PetscNot
negates a logical type value and returns result as a `PetscBool` 


## Note
This is useful in cases like
```none
     int        *a;
     PetscBool  flag = PetscNot(a)
```

where !a would not return a `PetscBool` because we cannot provide a cast from int to `PetscBool` in C.


## See Also
 `PetscBool`, `PETSC_TRUE`, `PETSC_FALSE`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petscsys.h.html#PetscNot">include/petscsys.h</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscsys.h)


[Index of all Sys routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
