:orphan:
# PetscFunctionReturnVoid
Like `PetscFunctionReturn()` but returns `void` 
## Synopsis
```
#include <petscerror.h>
void PetscFunctionReturnVoid()
```
Not Collective




## Note
Behaves identically to `PetscFunctionReturn()` except that it returns `void`. That is, this
macro culminates with `return`.


## Example Usage
```none
  void foo()
  {
    PetscFunctionBegin; // must start with PetscFunctionBegin!
    bar();
    baz();
    PetscFunctionReturnVoid();
  }
```



## See Also
 `PetscFunctionReturn()`, `PetscFunctionBegin`, PetscFunctionBeginUser`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petscerror.h.html#PetscFunctionReturnVoid">include/petscerror.h</A>

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


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscerror.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)  
