:orphan:
# PetscBool3
Ternary logical variable. Actually an enum in C and a 4 byte integer in Fortran. 
## Synopsis
```
typedef enum {
  PETSC_BOOL3_FALSE,
  PETSC_BOOL3_TRUE,
  PETSC_BOOL3_UNKNOWN = -1
} PetscBool3;
```



## Note
Should not be used with the if (flg) or if (!flg) syntax.


## See Also
 `PETSC_TRUE`, `PETSC_FALSE`, `PetscNot()`, `PETSC_BOOL3_TRUE`, `PETSC_BOOL3_FALSE`, `PETSC_BOOL3_UNKNOWN`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petscsystypes.h.html#PetscBool3">include/petscsystypes.h</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ksp/ksp/tutorials/ex76.c.html">src/ksp/ksp/tutorials/ex76.c</A><BR>


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


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