Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / how many lines?

Author
Message
Lzdude69
21
Years of Service
User Offline
Joined: 21st May 2004
Location: Indiana
Posted: 3rd Dec 2004 21:33
Is there anyway to find out how many lines are in a file...?

Yeah...
hyrichter
21
Years of Service
User Offline
Joined: 15th Feb 2004
Location: Arizona
Posted: 3rd Dec 2004 22:17
Do you mean how many lines of source code you have? It's easy. Throw away the default editor and use DarkEDIT (find it in the showcase). The line numbers are shown right there in the editor.

computer
20
Years of Service
User Offline
Joined: 5th Oct 2004
Location:
Posted: 3rd Dec 2004 23:11 Edited at: 3rd Dec 2004 23:12
If your trying to find out how many lines you've saved to a file with DB, perhaps before you store all the data, you could add up how much data you've written to the file and store it at the top of the file.

If you havn't or can't figure out how, then perhaps do a slow while FILE END(File Number)=0 endwhile and increase a variable each loop.

while
read string File Number, Variable String
inc lines
endwhile

?

Yes there will be coding problems.

Login to post a reply

Server time is: 2025-05-24 17:10:05
Your offset time is: 2025-05-24 17:10:05