Click here for a more detailed discusion of this example/test program along with a listing which includes line numbers.