: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
include/petscsystypes.h
## Examples
src/ksp/ksp/tutorials/ex76.c
---
[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)