1
QB64 Discussion / Re: STRINGS FEATURE
« on: January 27, 2021, 10:13:01 pm »
I first used QBASIC about 1992. QBASIC destroyed my favorite puzzle. I would present a list of 13 nine-digit numbers and ask which one is the prime. (Numbers were sequential from 99,999,999 to 100,000,011.) I gave the hint that 100,000,003 is NOT a prime. (Not that it matters, it is evenly divisible by 643.)
With the old BASIC you needed double precision to do numbers above 6 digits. Few could remember how to do that. With QBASIC, the problem could be solved using long integers (%).
My Atari BASIC had 8 digit accuracy and would also produce an accurate 10-digit result.
The point of the exercise was just to show how lazy programmers are. By using logic, you can eliminate all but two number. ((10^8)+1) and ((10^8)+7). With all others eliminated by lower primes, all anyone needs to do is divide the last two numbers by the next two primes (13 and 17) to learn which ONE is the prime. This could have been done by the calculator in MS-DOS. NOT by the fancy expensive calculator they had hanging on their belt. They nearly all had 8 digits.
So many, wouldn't even try to write the program. We were all that lazy. Most just say they couldn't do it.
I always had respect for QBASIC. I liked the built-in ASCII chart and the math line. (Both retained by QB64 --Thank you.)
I remember reading that Microsoft released GW-BASIC under the MIT license in 2020. I am in no hurry to find it.
With the old BASIC you needed double precision to do numbers above 6 digits. Few could remember how to do that. With QBASIC, the problem could be solved using long integers (%).
My Atari BASIC had 8 digit accuracy and would also produce an accurate 10-digit result.
The point of the exercise was just to show how lazy programmers are. By using logic, you can eliminate all but two number. ((10^8)+1) and ((10^8)+7). With all others eliminated by lower primes, all anyone needs to do is divide the last two numbers by the next two primes (13 and 17) to learn which ONE is the prime. This could have been done by the calculator in MS-DOS. NOT by the fancy expensive calculator they had hanging on their belt. They nearly all had 8 digits.
So many, wouldn't even try to write the program. We were all that lazy. Most just say they couldn't do it.
I always had respect for QBASIC. I liked the built-in ASCII chart and the math line. (Both retained by QB64 --Thank you.)
I remember reading that Microsoft released GW-BASIC under the MIT license in 2020. I am in no hurry to find it.