OptionsGetString

Gets the string value for a particular option in the database.

Synopsis

int OptionsGetString(char *pre,char *name,char *string,int len, int *flg)
Not Collective

Input Parameters

name - the option one is seeking
len - maximum string length
pre - string to prepend to name or PETSC_NULL

Output Parameters

string - location to copy string
flg - 1 if found, else 0

Fortran Note

The Fortran interface is slightly different from the C/C++ interface (len is not used). Sample usage in Fortran follows
      character *20 string
      integer   flg, ierr
      call OptionsGetString(PETSC_NULL_CHARACTER,'-s',string,flg,ierr)

Keywords

options, database, get, string

See Also

OptionsGetInt(), OptionsGetDouble(),
OptionsHasName(), OptionsGetIntArray(), OptionsGetDoubleArray()

Location: src/sys/src/objectsoptions.c
System Index
Table of Contents