From 1b34e763de49b072a5e4377a6d13d2420f883271 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 17 May 2013 06:56:42 -0600 Subject: The --text-primes option supports a parameter. You can tell it where to start now. --- src/options.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/options.cpp b/src/options.cpp index 9ade56a..7fbd70e 100644 --- a/src/options.cpp +++ b/src/options.cpp @@ -52,7 +52,7 @@ bool hasDigits( const Bu::String &s ) return false; } -int Options::textPrimes( Bu::StringArray ) +int Options::textPrimes( Bu::StringArray aArgs ) { Number tst( 0, 36 ); Number max( 0, 36 ); @@ -61,8 +61,12 @@ int Options::textPrimes( Bu::StringArray ) Number fact( 0, 36 ); one = "1"; fact = "2"; + if( aArgs.getSize() >= 2 ) + tst = aArgs[1]; + else + tst = "1"; - for( tst = "1";; tst = tst + one ) + for(;; tst = tst + one ) { if( hasDigits( tst.toString() ) ) continue; -- cgit v1.2.3