You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
Cool Lance, I wrote it like this:
OPEN SourceFile FOR INPUT AS 100 LEN = 8192
I am compiling a huge file from many smaller ones. Each "small one is 22k lines. I have about 10 of them to compile (is there a limit to the size of a .txt file?)
I assume the 8192 is the number of bytes?
Im not on a network so can I allocate a much bigger chunk of memory like say 500k or even 1MB?
On a side note, to speed up reading a sequential file, add a LEN=8192 clause to the OPEN statement. For a sequential file, this tells PowerBASIC to use an internal buffer when getting data from the file, usually increasing read speed quite dramatically.
You can specify a much larger value which will improve things even more, however, when reading across a network, 8192 is about the ("rule of thumb") optimal buffer size to avoid network saturation.
If I open a file for sequential reading of lines with:
OPEN MyFile.txt FOR INPUT AS #1
and read 2/3 of the contents, how do I start back at the top again?
Do I have to close the file and re-Open it? IS that the only way or is there some little GoToTop command i am missing?
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: