Hi,
In the docs, there is no indication about the maximun length that ReadString() can return.
I searched in the PB forums (Keywords : ReadString Length) and didn't find any concluant post.
I use ReadString(FileNb,#PB_File_IgnoreEOL,#PB_File_IgnoreEOL) to retrieve the whole content of text files and for the first time, one file has more than 65536 chars.
As, in theory, string variables have no length limitation, it seems that ReadString() can't return more than these 65536 chars...
Can you confirm ? Is it a bug or a inherent limitation ? If it really is a limitation, perhaps it should be mentioned in the docs (in which case, I'll create a request in the right section).
Thanks.
[SOLVED] ReadString() and reading length
[SOLVED] ReadString() and reading length
Last edited by boddhi on Tue Jun 10, 2025 9:13 pm, edited 1 time in total.
If my English syntax and lexicon are incorrect, please bear with Google translate and DeepL. They rarely agree with each other!
Except on this sentence...
Except on this sentence...
Re: ReadString() and reading length
The Problem is not PB.
The second Parameter of ReadString is the length!
You set length as #PB_File_IgnoreEOL = 65536
That's your problem
The second Parameter of ReadString is the length!
You set length as #PB_File_IgnoreEOL = 65536
That's your problem
Re: ReadString() and reading length
SMaag wrote: You set length as #PB_File_IgnoreEOL = 65536
That's your problem

Thanks

Thanks for the explicative link, RashadRASHAD wrote:

If my English syntax and lexicon are incorrect, please bear with Google translate and DeepL. They rarely agree with each other!
Except on this sentence...
Except on this sentence...