Record count

Use this forum to ask any questions and to submit bug reports

Moderator: vuser

Post Reply
cjegan
Posts: 6
Joined: Fri Mar 16, 2012 5:39 pm

Record count

Post by cjegan »

Charles

The record count in the status bar may not be correct, and this can create confusion. This file is a directory listing and has 2354 records each 60 bytes long (the folder names), plus 4,606,022 records each 74 bytes long (the file names). This gives a total file size of 340,986,868 bytes (the record length includes the CR/LF). The record count in the status bar is 4,607,930 - which is the file size divided by 74. The Count Word/Lines finds the correct number of 4,608,376. If I load the entire file, rather than chunks, the record count is shown as the correct value of 4,608,376.
I was relying on the count in the status bar to compare two similar files, and couldn't understand the discrepancy I was seeing. I understand it is easy to assume that since so many of the records are the same length that it can be used to calculate the record count. Could you at least update the status bar to the value found from the Count Words/Lines tool if that has been run.

Chris
Attachments
V_record_count.jpg
V_record_count.jpg (65.98 KiB) Viewed 55641 times
FileViewer
Site Admin
Posts: 287
Joined: Fri Apr 30, 2010 5:50 pm

Re: Record count

Post by FileViewer »

The record count in the status bar may not be correct, and this can create confusion.
When a file is being displayed in chunks, the line count displayed in the status bar is only an estimate.

Usually, only the number of lines in the current chunk are displayed in the status bar. However, in your case, every line in the chunk being viewed has the same length, so V assumes that every line in the file has the same length and calculates the number of records accordingly. This will be incorrect when not all lines have the same length.

The only way to get the correct record count is to either load the entire file or do a Word/Line count from the Tools menu.
Could you at least update the status bar to the value found from the Count Words/Lines tool if that has been run.
I'll see what I can do. I may also display "estimate" next to the value in the status bar so the user understands that the value may be incorrect.
Post Reply