diff options
Diffstat (limited to '')
-rw-r--r-- | src/options.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/options.cpp b/src/options.cpp index d9cd8f1..59dd2b4 100644 --- a/src/options.cpp +++ b/src/options.cpp | |||
@@ -19,7 +19,8 @@ Options::Options( int argc, char *argv[] ) : | |||
19 | addOption( Bu::slot(this, &Options::textPrimes), "text-primes", | 19 | addOption( Bu::slot(this, &Options::textPrimes), "text-primes", |
20 | "Generate primes in base 36 that only have digits > 9 in them."); | 20 | "Generate primes in base 36 that only have digits > 9 in them."); |
21 | addOption( Bu::slot(this, &Options::isPrime), 'p', "is-prime", | 21 | addOption( Bu::slot(this, &Options::isPrime), 'p', "is-prime", |
22 | "Test if the given number is prime. Set radix first."); | 22 | "Tests every parameter after to see if it is prime then prints out " |
23 | "the ones that are prime. Set radix first."); | ||
23 | addHelpOption('h', "help", "This help"); | 24 | addHelpOption('h', "help", "This help"); |
24 | 25 | ||
25 | parse( argc, argv ); | 26 | parse( argc, argv ); |
@@ -93,12 +94,9 @@ int Options::isPrime( Bu::StringArray aArgs ) | |||
93 | one = "1"; | 94 | one = "1"; |
94 | fact = "2"; | 95 | fact = "2"; |
95 | 96 | ||
96 | Bu::println("Radix: %1").arg( iRadix ); | ||
97 | |||
98 | for( Bu::StringArray::iterator i = aArgs.begin()+1; i; i++ ) | 97 | for( Bu::StringArray::iterator i = aArgs.begin()+1; i; i++ ) |
99 | { | 98 | { |
100 | tst = *i; | 99 | tst = *i; |
101 | Bu::println("%1").arg( tst ); | ||
102 | max = tst / fact; | 100 | max = tst / fact; |
103 | bool bPrime = true; | 101 | bool bPrime = true; |
104 | for( j = "2"; j < max; j = j + one ) | 102 | for( j = "2"; j < max; j = j + one ) |