# PetscOptionsDeprecated
mark an option as deprecated, optionally replacing it with a new one 
## Synopsis
```
#include "petscsys.h"   
PetscErrorCode PetscOptionsDeprecated_Private(PetscOptionItems *PetscOptionsObject, const char oldname[], const char newname[], const char version[], const char info[])
```
Prints a deprecation warning, unless an option is supplied to suppress.

Logically Collective


## Input Parameters

- ***pre -*** string to prepend to name or NULL
- ***oldname -*** the old, deprecated option
- ***newname -*** the new option, or NULL if option is purely removed
- ***version -*** a string describing the version of first deprecation, e.g. "3.9"
- ***info -*** additional information string, or NULL.



## Options Database Key

- ***-options_suppress_deprecated_warnings -*** do not print deprecation warnings



## Notes
Must be called between `PetscOptionsBegin()` (or `PetscObjectOptionsBegin()`) and `PetscOptionsEnd()`.
Only the process of rank zero that owns the `PetscOptionsItems` are argument (managed by `PetscOptionsBegin()` or
`PetscObjectOptionsBegin()` prints the information
If newname is provided, the old option is replaced. Otherwise, it remains
in the options database.
If an option is not replaced, the info argument should be used to advise the user
on how to proceed.
There is a limit on the length of the warning printed, so very long strings
provided as info may be truncated.




## See Also
 `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsScalar()`, `PetscOptionsBool()`, `PetscOptionsString()`, `PetscOptionsSetValue()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/objects/options.c.html#PetscOptionsDeprecated">src/sys/objects/options.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/objects/options.c)


[Index of all Sys routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
