:orphan:
# PetscOptionsIntArray
Gets an array of integers for a particular option in the database.
## Synopsis
```
#include "petscsys.h"
PetscErrorCode PetscOptionsIntArray(const char opt[],const char text[],const char man[],PetscInt value[],PetscInt *n,PetscBool *set)
```
Logically Collective on the communicator passed in `PetscOptionsBegin()`
## Input Parameters
- ***opt -*** the option one is seeking
- ***text -*** short string describing option
- ***man -*** manual page for option
- ***n -*** maximum number of values
## Output Parameters
- ***value -*** location to copy values
- ***n -*** actual number of values found
- ***set -*** `PETSC_TRUE` if found, else `PETSC_FALSE`
## Notes
The array can be passed as
- ***a comma separated list -*** 0,1,2,3,4,5,6,7
- ***a range (start-end+1) -*** 0-8
- ***a range with given increment (start-end+1:inc) -*** 0-7:2
- ***a combination of values and ranges separated by commas -*** 0,1-8,8-15:2
There must be no intervening spaces between the values.
Must be between a `PetscOptionsBegin()` and a `PetscOptionsEnd()`
## See Also
`PetscOptionsGetInt()`, `PetscOptionsGetReal()`,
`PetscOptionsHasName()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,
`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
`PetscOptionsFList()`, `PetscOptionsEList()`, `PetscOptionsRealArray()`
## Level
beginner
## Location
src/sys/objects/aoptions.c
## Examples
src/dm/impls/plex/tutorials/ex11.c
src/dm/impls/plex/tutorials/ex13.c
src/dm/impls/plex/tutorials/ex6.c
src/dm/tutorials/ex2.c
src/ksp/ksp/tutorials/ex71.c
src/mat/tutorials/ex17.c
src/snes/tutorials/ex15.c
src/ts/tutorials/ex11.c
src/ts/tutorials/ex11_sa.c
---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/objects/aoptions.c)
[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)