

                            Users Documention Guide
                               for: PRIMLIST.EXE


-=HOW THE PROGRAM WORKS=-
PRIMLIST is used to create a list of primes based on starting prime number.
The starting prime number is read from "LASTPRIM.LST".  This file is
necessary to run the program.  After the starting number is read, the
program then begins to create a list of prime numbers and save them to disk.
The list is automatically saved (appended) to "PRIMES.LST".  Once 10,000
primes are found the last prime number is saved in "LASTPRIM.LST".  The goal
of PRIMLIST was to create a list of prime numbers from 2 to 1073741824.  This
program demonstrates how to get input from a file and how to save information
to a file.  It also shows proper use of lables, comments, loops, and other
important items in C programming.  This program was not meant to serve the
purpose of generating prime numbers, there are (no doubt) much better methods
to finding prime numbers.  However, this method does work.


-=COMMON QUESTIONS, ANSWERS, AND PROBLEMS=-
One common question is: Is there a way to change the name of the textfile
containing the outputted list of primes or the last prime number found.
Short of rewriting the code and recompiling the program, no.

One other thing that often occurs is that the user ends up with a huge text
file containg all the prime numbers.  WARNING: the primes list can become
VERY VERY LARGE if the program is not stopped.  You can stop the program at
any time by pressing the ctrl-break key combination.  This will also occur
with "SIEVE.EXE".

If you did not recieve the file entitled "LASTPRIM.LST", don't panic, the
program will still work.  You will just have to create the lastprim.lst file
yourself.  Essentially the file only contains one number, the last prime
number found by the program.  So to create a prime number list from the
beginning you enter 2 as the last prime number found right?  Well yes, that
will work, except the primes.lst file will be missing the first four (4)
prime numbers.  This is not a bug in coding but just a problem that the
author doesn't care to change.  Don't worry, all the other prime numbers are
there!  If you want the complete list you will just have to type the first
four primes into PRIMES.LST yourself.  In case you're wondering, the first
primes are: 2,3,5, and 7.

I am not currently aware of any other problems with the program but you can
contact me if you encounter any ( see the bottom of the file ).


-=THE METHOD USED TO DETERMINE PRIME NUMBERS=-
The method used to determine whether the number is prime or not is a very
simple one.  This is the same method used in "PRIME.EXE".
To explain this method I will need to simulate the program.  First, assume I
have a constant number.  We will call this number x.  The user is asked to
input x and the process begins from there.  After we have x we then find the
square root of x and we will call that squarex.  If x is prime, then it
cannot be evenly devided by any ot the intergers below or equal to squarex.
Therefore if we devide x by all the numbers below squarex and find that none
go into x evenly, then x is prime.  This is exactly what the program does.


-=HOW PRIMLIST.EXE WAS WRITTEN=-
PRIMLIST.EXE was written and compiled in MICROSOFT C (not c++).  I believe it
follows the standard C language and is ANSI C compliant.  To gain more
insight into the program... try reading the commented source code
("PRIMLIST.C").  If you would like more information or would like to contact
the author to offer suggestions, please feel free to do so!
You can reach me at:

Austin.C.J.Fowler@worldnet.att.net      (main address)
fone_phreak78@hotmail.com               (never read this mail)
HTTP://HOME.ATT.NET/~Austin.C.J.Fowler  (home page)
DALNET:  THe ICe_SurFer                 (irc registered screen name)
