BBS: Inland Empire Archive Date: 02-15-93 (15:17) Number: 323 From: MARK HARRIS Refer#: NONE To: ALL Recvd: NO Subj: Prime Number prog Conf: (2) Quik_Bas

CALLSetDisplayScrn(Total, n)'This is the main'screenOPEN"c:\tmp\prime.num"FORRANDOMAS#1'^^^^^^^^ set whatever path you'd likeFORn = 1TO7'This starts us offREADnum'seeding some numbersPUT#1, n, num'to work withNEXTn count = 7FORn = 17TO10000000STEP2'This is the main loopCOLORStarwhite, LtblueLOCATE7, 46:LOCATE9, 45:FORi = 3TOcount - 3 a$ =INKEY$IFa$ = CHR$(27)THENEndprogramIFa$ = "V"ORa$ = "v"THENView.primes (count)GET#1, i, prime test = n / prime test2 = INT(test) test3 = test2 - testIFtest3 = 0THENGOTO10NEXTiCALLRecord.prime(count, Total, n) 10 :NEXTnDATA1,2,3,5,7,11,13'The data above is the first few primes.'They are needed to determine the ones'that come after them, since any whole'number can be written as the product'of two primes.SUBEndprogram'Here's part of the professional look I'wanted to illustrate. It just isn't'nice to leave garbage from your'program littering someones screen.'I always include this to reset'everything the way it probably'started.COLORWhite, BlackCLSENDENDSUBSUBIntroscreen'This sub give basic information'about the program before it'actually does it's stuff... OFFLINE 1.50 "Quit worrying about your health. It will go away." --- MsgToss 2.0d(beta) 12/17/92 * Origin: JW-PC Consulting DataFlex.HST (608)837-1923 (1:121/8)

Echo Basic Postings

**Books at Amazon:**

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET