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
10: int main(int argc,char **argv)
11: {
12: int ierr,choice;
13: char *choices[] = {"Say hello","Say goodbye"};
15: PetscInitialize(&argc,&argv,(char *)0,0);
16: PetscPopUpSelect(PETSC_COMM_WORLD,PETSC_NULL,"Select one of ",2,choices,&choice);
17: PetscSynchronizedPrintf(PETSC_COMM_WORLD,"You selected %sn",choices[choice]);
18: PetscSynchronizedFlush(PETSC_COMM_WORLD);
19: PetscFinalize();
20: return 0;
21: }
22: