00001 #include "stdinc.h" 00002 00003 main(int argc, char **argv) 00004 { 00005 extern char *poptarg; 00006 int c; 00007 real s = 0; 00008 char* param_string = "s:"; 00009 00010 while ((c = pgetopt(argc, argv, param_string)) != -1) { 00011 switch (c) { 00012 case 's': s = atof(poptarg); 00013 00014 } 00015 00016 } 00017 00018 cerr << "sqrt(" << s << ") = "; 00019 cerr << sqrt(s); 00020 }