Actual source code: ex8f90.F90
petsc-3.7.3 2016-08-01
3: #include petsc/finclude/petscdef.h
4: use petsc
5: implicit none
7: PetscErrorCode :: ierr
8: Character(len=99) list1(6)
9: PetscEnum :: opt=-1
10: PetscBool :: set=PETSC_FALSE
12: Call PetscInitialize(PETSC_NULL_CHARACTER,ierr)
13: list1(1) = 'a123'
14: list1(2) = 'b456'
15: list1(3) = 'c789'
16: list1(4) = 'list1'
17: list1(5) = 'prefix_'
18: list1(6) = ''
20: write(*,20) list1(1)
21: 20 format(A99)
22: call PetscOptionsGetEnum(PETSC_NULL_OBJECT,'joe_','-jeff', &
23: & list1,opt,set,ierr)
24: write(*,*) 'opt is ', opt
25: write(*,*) 'set is ', set
27: Call PetscFinalize(ierr)
28: end