Actual source code: ex15.c
1: /*$Id: ex15.c,v 1.4 2001/03/23 23:20:59 balay Exp $*/
3: /*
4: Demonstrates PetscPopUpSelect()
5: */
7: #include petsc.h
12: int main(int argc,char **argv)
13: {
14: int ierr,choice;
15: char *choices[] = {"Say hello","Say goodbye"};
17: PetscInitialize(&argc,&argv,(char *)0,0);
18: PetscPopUpSelect(PETSC_COMM_WORLD,PETSC_NULL,"Select one of ",2,choices,&choice);
19: PetscSynchronizedPrintf(PETSC_COMM_WORLD,"You selected %s\n",choices[choice]);
20: PetscSynchronizedFlush(PETSC_COMM_WORLD);
21: PetscFinalize();
22: return 0;
23: }
24: