Changeset 360 for cpp/frams/_demos
- Timestamp:
- 04/18/15 17:29:17 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/_demos/geno_test.cpp
r359 r360 6 6 #include <frams/util/sstringutils.h> 7 7 #include <frams/genetics/preconfigured.h> 8 #include <frams/errmgr/stdouterr. h>8 #include <frams/errmgr/stdouterr.cpp> 9 9 10 10 /** … … 13 13 14 14 \include geno_test.cpp 15 */15 */ 16 16 17 int main(int argc, char*argv[])17 int main(int argc, char*argv[]) 18 18 { 19 PreconfiguredGenetics genetics;20 StdoutErrorHandler stdouterr; //comment this object out to mute error/warning messages19 PreconfiguredGenetics genetics; 20 StdoutErrorHandler stdouterr; //comment this object out to mute error/warning messages 21 21 22 if (argc<=1)22 if (argc <= 1) 23 23 { 24 puts("no genotype");25 return 10;24 puts("no genotype"); 25 return 10; 26 26 } 27 SString gen(argv[1]);28 if (!strcmp(gen.c_str(),"-"))27 SString gen(argv[1]); 28 if (!strcmp(gen.c_str(), "-")) 29 29 { 30 gen=0;31 StdioFILEDontClose in(stdin);32 loadSString(&in,gen);30 gen = 0; 31 StdioFILEDontClose in(stdin); 32 loadSString(&in, gen); 33 33 } 34 Geno g(gen);35 puts(g.isValid()?"valid":"invalid");36 return !g.isValid();34 Geno g(gen); 35 puts(g.isValid() ? "valid" : "invalid"); 36 return !g.isValid(); 37 37 }
Note: See TracChangeset
for help on using the changeset viewer.