:orphan: # PETSC_STATIC_ARRAY_LENGTH Return the length of a static array ## Synopsis ``` #include size_t PETSC_STATIC_ARRAY_LENGTH(a) ``` ## Input Parameter - ***a -*** a static array of any type ## Output Parameter - *** - the length of the array ## Example ```none PetscInt a[22]; size_t sa = PETSC_STATIC_ARRAY_LENGTH(a) ``` `sa` will have a value of 22 ## Level intermediate ## Location include/petscmacros.h ## Examples src/ksp/ksp/tutorials/ex56.c
src/snes/tutorials/ex62.c
src/ts/tutorials/ex11.c
src/ts/tutorials/ex11_sa.c
src/ts/tutorials/ex18.c
src/ts/tutorials/extchemfield.c
--- [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)