OptionsGetString

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

Synopsis

#include "petsc.h"   
int OptionsGetString(const char pre[],const char name[],char string[],int len,PetscTruth *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 - PETSC_TRUE if found, else PETSC_FALSE

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()

Level:beginner
Location:src/sys/src/objects/options.c
System Index
Table of Contents