Skip to main content
`Ctrl`+`K`

# PetscVSNPrintf

The PETSc version of `vsnprintf()`. Ensures that all `%g` formatted arguments’ output contains the decimal point (which is used by the test harness)

## Synopsis

    PetscErrorCode PetscVSNPrintf(char str[], size_t len, const char format[], size_t *fullLength, va_list Argp)

No Fortran Support

## Input Parameters

- str - location to put result

- len - the length of `str`

- format - the PETSc format string

- Argp - the variable argument list to format

## Output Parameter

- fullLength - the amount of space in `str` actually used.

## Developer Notes

This function may be called from an error handler, if an error occurs when it is called by the error handler than likely a recursion will occur resulting in a crash of the program.

If the length of the format string `format` is on the order of `PETSCDEFAULTBUFFERSIZE` (8 * 1024 bytes) or larger, this function will call `PetscMalloc()`

## See Also

`PetscFormatConvert()`, `PetscFormatConvertGetSize()`, `PetscErrorPrintf()`, `PetscVPrintf()`

## 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