:orphan: # PetscScalarView Prints an array of `PetscScalar`; useful for debugging. ## Synopsis ``` #include "petscsys.h" PetscErrorCode PetscScalarView(PetscInt N, const PetscScalar idx[], PetscViewer viewer) ``` Collective ## Input Parameters - ***N -*** number of scalars in array - ***idx -*** array of scalars - ***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 byte swapping may be done ## See Also `PetscViewer`, `PetscIntView()`, `PetscRealView()` ## Level intermediate ## Location src/sys/error/err.c ## Examples src/dm/field/tutorials/ex1.c
src/dm/impls/plex/tutorials/ex8.c
--- [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](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)