Actual source code: ex15.c
petsc-3.3-p7 2013-05-11
2: /*
3: Demonstrates PetscPopUpSelect()
4: */
6: #include <petscsys.h>
11: int main(int argc,char **argv)
12: {
13: int ierr,choice;
14: const char *choices[] = {"Say hello","Say goodbye"};
16: PetscInitialize(&argc,&argv,(char *)0,0);
17: PetscPopUpSelect(PETSC_COMM_WORLD,PETSC_NULL,"Select one of ",2,choices,&choice);
18: PetscSynchronizedPrintf(PETSC_COMM_WORLD,"You selected %s\n",choices[choice]);
19: PetscSynchronizedFlush(PETSC_COMM_WORLD);
20: PetscFinalize();
21: return 0;
22: }
23: