Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Line Counter
#11
It worked a charm thanks man and to everyone that helped..
img]http://img213.imageshack.us/img213/6104/sig1jb.gif[/img]
Reply
#12
Hybr!d,

I'd like to add my two cents to this thread.

Apparently, you obtained the code from someone else. This person decided that null lines were not to be counted. Any utility or editor will include these lines in the line count. What do you want to do with them?

Null strings, null lines, space lines, or null records can often appear in a text file. If you looked at them with a hex editor, they appear as a record containing only a Carriage Return and a Line Feed. There is nothing in front of the CR/LF. So when you read these records with LINE INPUT, the data portion of the record appears as null, i.e., "". Null is the correct terminology.

But, don't confuse a null string that we're talking about above with a null character. A null character, i.e., a chr$(0) is actually a valid character in QBasic and occupies one character position. Note that null characters are handled differently in Freebasic.

When you created a text file and double space after some text, or move down for a new paragraph, you will create these null records in the text file.
*****
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)