it has 8,584,877,294 characters ...This is a family history file..
Announcement
Collapse
No announcement yet.
MAX string length in variable?
Collapse
X
-
Originally posted by Michael Mattias:
>If the file literally contains "billions" of characters, you will have to read them in chunks.
8,584,877,294 characters including punctuation marks and spaces.
(thank goodness for P4s!)
I will read them in chunks. I -had- thought about reading them in
chunks, and write that to a temp file, and then use the temp file
to create a properly formatted file. (This is a family history
file, btw, and written before the advent of Windows, so it
isn't properly formatted yet.)
Thanks to everyone who responded!
Robert
------------------
Leave a comment:
-
>That or pick up a copy of PB/CC..The console compiler should be able to digest that up to the available space on your hard drive.
No, it can't. The maximum addressable user memory for a 32-bit application is 2.1 Gb only, not "available disk space. "
If the file literally contains "billions" of characters, you will have to read them in chunks.
Leave a comment:
-
Originally posted by Ian Cairns:
...and input the file as managable chunks.... The console compiler should
be able to digest that up to the available space on your hard
drive. The syntax is quite similar but you would have to adjust
your style to accomodiate it.
------------------
Leave a comment:
-
Robert,
With PB3.2, the documentation says the maximum size of a string is 32750 bytes.
I recommend that you open the file as binary, and input the file as managable chunks, ie:
Code:fhandle% = freefile open "myfile.bin" for binary as # fhandle% do while not eof(fhandle%) GET$ #fhandle%, 32750, inputString$ ' do something with input string
happy new year,
Ian Cairns
------------------
[email protected]
Leave a comment:
-
Robert,
I think the maximum possible string in PB/DOS is 32750 characters long.
You'll have to limit your chunks to something less than that.
Paul.
Leave a comment:
-
MAX string length in variable?
Thank you for the sample code to break a definition into smaller
and easier manageable parts. Now, a variaion on this.
I have several files that are just one line, but billions of
characters long. I.e, there is no end-of-line or carriage return
except at the very end. If I:
Line Input #1, getall$
How much of that single line will I confidently obtain? Should I
purposely read in the first million characters, work with it,
then read in the second million, work with it and repeat until
done?
Thank you.
Robert
------------------
Tags: None
Leave a comment: