PETSc version 3.17.4
Fix/Edit manual page

# PetscStringize

Stringize a token

### Synopsis

    #include <petscmacros.h>
    const char* PetscStringize(x)

### Input Parameter

| x | - The token you would like to stringize

### Output Parameter

| <return | - value> - The string representation of x

### Notes

Not available from Fortran.

PetscStringize() expands x before stringizing it, if you do not wish to do so, use PetscStringize_() instead.

### Example Usage

      #define MY_OTHER_VAR hello there
      #define MY_VAR       MY_OTHER_VAR

      PetscStringize(MY_VAR)  -> "hello there"
      PetscStringize_(MY_VAR) -> "MY_VAR"

      int foo;
      PetscStringize(foo)  -> "foo"
      PetscStringize_(foo) -> "foo"

### See Also

PetscConcat(), PetscExpandToNothing(), PetscExpand()

### Level

beginner

### Location

include/petscmacros.h
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages