PetscFormatRealArray#

Format an array of PetscReal values as a comma-separated string using a printf-style format

Synopsis#

PetscErrorCode PetscFormatRealArray(char buf[], size_t len, const char *fmt, PetscInt n, const PetscReal x[])

Not Collective; No Fortran Support

Input Parameters#

  • len - the length of the output buffer in bytes

  • fmt - the printf-style format string applied to each element (e.g. "%g")

  • n - number of values in x

  • x - array of PetscReal values to format

Output Parameter#

  • buf - the formatted, null-terminated string

Note#

Returns an error if the formatted output would not fit in buf.

See Also#

PetscSNPrintf(), PetscViewerASCIIPrintf()

Level#

developer

Location#

src/sys/fileio/mprint.c


Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages