1 static char help[] = "Tests %d and %g formatting\n"; 2 #include <petscsys.h> 3 4 int main(int argc,char **argv) 5 { 6 7 CHKERRQ(PetscInitialize(&argc,&argv,(char*)0,help)); 8 CHKERRQ(PetscPrintf(PETSC_COMM_WORLD,"A string followed by integer %d\n",22)); 9 CHKERRQ(PetscPrintf(PETSC_COMM_WORLD,"A string followed by double %5g another %g\n",23.2,11.3)); 10 CHKERRQ(PetscPrintf(PETSC_COMM_WORLD,"and then an int %d\n",30)); 11 12 CHKERRQ(PetscFinalize()); 13 return 0; 14 } 15 16 /*TEST 17 18 test: 19 diff_args: -j 20 21 TEST*/ 22