# PetscIntView
Prints an array of integers; useful for debugging. 
## Synopsis
```
#include "petscsys.h" 
PetscErrorCode PetscIntView(PetscInt N, const PetscInt idx[], PetscViewer viewer)
```
Collective on viewer


## Input Parameters

- ***N -*** number of integers in array
- ***idx -*** array of integers
- ***viewer -*** location to print array, `PETSC_VIEWER_STDOUT_WORLD`, `PETSC_VIEWER_STDOUT_SELF` or 0





## Note
This may be called from within the debugger


## Developer Note
idx cannot be const because may be passed to binary viewer where temporary byte swapping may be done


## See Also
 `PetscViewer`, `PetscRealView()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/error/err.c.html#PetscIntView">src/sys/error/err.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/is/tutorials/ex4.c.html">src/vec/is/is/tutorials/ex4.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/is/tutorials/ex5.c.html">src/vec/is/is/tutorials/ex5.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/sf/tutorials/ex1.c.html">src/vec/is/sf/tutorials/ex1.c.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/vec/is/sf/tutorials/ex1f.F90.html">src/vec/is/sf/tutorials/ex1f.F90.html</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/dm/impls/plex/tutorials/ex8.c.html">src/dm/impls/plex/tutorials/ex8.c.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/error/err.c)


[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)  
