:orphan:
# ISGetIndices
Returns a pointer to the indices. The user should call `ISRestoreIndices()` after having looked at the indices. The user should NOT change the indices.
## Synopsis
```
#include "petscis.h"
PetscErrorCode ISGetIndices(IS is, const PetscInt *ptr[])
```
Not Collective
## Input Parameter
- ***is -*** the index set
## Output Parameter
- ***ptr -*** the location to put the pointer to the indices
## Fortran Note
`ISGetIndices()` Fortran binding is deprecated (since PETSc 3.19), use `ISGetIndicesF90()`
## See Also
`IS`, `ISRestoreIndices()`, `ISGetIndicesF90()`
## Level
intermediate
## Location
src/vec/is/is/interface/index.c
## Examples
src/dm/impls/plex/tutorials/ex10.c
src/dm/tutorials/ex22.c
src/dm/tutorials/swarm_ex3.c
src/ksp/ksp/tutorials/ex19.c
src/ksp/ksp/tutorials/ex71.c
src/ksp/ksp/tutorials/ex76.c
src/snes/tutorials/ex13.c
src/snes/tutorials/ex56.c
src/snes/tutorials/ex77.c
src/tao/tutorials/ex3.c
src/ts/tutorials/ex11_sa.c
## Implementations
ISGetIndices_Block in src/vec/is/is/impls/block/block.c
ISGetIndices_General in src/vec/is/is/impls/general/general.c
ISGetIndices_Stride in src/vec/is/is/impls/stride/stride.c
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/vec/is/is/interface/index.c)
[Index of all IS routines](index.md)
[Table of Contents for all manual pages](/manualpages/index.md)
[Index of all manual pages](/manualpages/singleindex.md)