Search:

Type: Posts; User: Norm

Search: Search took 0.13 seconds.

  1. Re: Reading text file and counting the number of words, integers, and floats.

    Did you print out some of the integers and floats that were counted incorrectly?
    Can you post them and the debug print outs from the methods that tested them?

    Write a simple testing program...
  2. Re: Reading text file and counting the number of words, integers, and floats.

    Make a small input file, add printlns as I described to print out the results as each line is read.
    Execute the program and look at the output and see if it is correct. If not then add more printlns...
  3. Re: Reading text file and counting the number of words, integers, and floats.

    Try debugging the program by adding printlns to the code that track the execution and show the results of each test line by line and value by value.

    Print out each line as it is read, then print...
  4. Re: Reading text file and counting the number of words, integers, and floats.

    Are the count like this:
    wrong vs correct
    64 vs 129 ints
    29 vs 30 words
    3 vs 68 floats
    0 vs 6 invalid
  5. Re: Reading text file and counting the number of words, integers, and floats.

    Can you post the program's output and also post what the output should be.

    For testing I'd use as small a file as possible so it is easy to see which numbers are wrong.
Results 1 to 5 of 5