:orphan: # PetscCompl Expands to the integer complement of its argument ## Synopsis ``` #include int PetscCompl(b) ``` No Fortran Support ## Input Parameter - ***b -*** Preprocessor variable, must expand to either integer literal 0 or 1 ## Output Parameter - *** - Either integer literal 0 or 1 ## Notes Expands to integer literal 0 if b expands to 1, or integer literal 1 if b expands to 0. Behaviour is undefined if b expands to anything else. PetscCompl() will expand its argument before returning the complement. This macro can be useful for negating `PetscDefined()` inside macros e.g. ```none #define PETSC_DONT_HAVE_FOO PetscCompl(PetscDefined(HAVE_FOO)) ``` ## Example usage ```none #define MY_VAR 1 PetscCompl(MY_VAR) -> 0 #undef MY_VAR #define MY_VAR 0 PetscCompl(MY_VAR) -> 1 ``` ## See Also `PetscConcat()`, `PetscDefined()` ## Level beginner ## Location include/petscmacros.h --- [Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscmacros.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)