On Thu, 24 Jan 2002 18:10:10 -0700, "Jim McAtee" <[EMAIL PROTECTED]> wrote:
>How does it accomplish this when you want to loop over the contents of a >large file? Does it keep the file open, or when you call it to read the >250,000th line, has it opened and closed and read through the file 249,999 >times already? > >Jim Nothing complicated involved. Every time you call the tag it opens the file and reads in the next carriage-deliminated string. Then closes the file. *You* pass to it the position in the file you want to read the next line from. "0" is the beginning of a file. Of course to make your life easy, it returns the position in the file the next line starts at. :) Just use the number in the next call while looping... or save it somewhere for later. With all that file opening, I'm not saying it's fast -- but it's simple and gets the job done. As for your example, if you happen to already know (or can guess -- say all lines are a fixed width) you can go directly to it. Otherwie, yes, you would have to parse through all the previous lines to know what the position of the line is in the file. ______________________________________________________________________ Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

