Tracy,
I'll throw one other solution into the mix. That works especially well if your lines are less than 254 characters:
create cursor TheFile ( cLine c(254) )
append from TheFile.txt type sdf
now you can use a scan loop to iterate the file. If the lines can exceed 254 you can put enough fields into your cursor to handle the max length.
This works with files that would cause alines() to hit array size limits. It has the advantage over fgets() in that you can easily manipulate blocks of lines according to commonalities ie
scan for "linetype=1" $ cLine. APPEND FROM works amazingly fast.
>I want to read a file line by line. I know that at the end of each line is a chr(13) followed by a chr(10). I typically read in a set number of bytes til I get to the end of a file, but in this case I want to make sure that I readin line by line. Is there an easy way to do that?