Page 2 of 2
Posted: Thu Oct 07, 2004 9:50 am
by PB
Wilbert, your example crashes when used with ReplaceString, so it's probably
best to just wait until v4.00 when PureBasic will support unlimited strings, or
at least avoid using ReplaceString. However, I found that when using strings
larger than 63999 bytes that my app kept crashing at random times, so I've
avoided a tip similar to yours as a result. Wait for the official fix.
Posted: Thu Oct 07, 2004 2:43 pm
by GedB
ukandrewc,
The 64k limit is mainly down to allocating strings.
I think you're best approach is to keep going as you are, and if you find any of the procedures fail with larger string write an equivalent using pointers.
You'll probably want to rewrite them anyway to get the speed benefits.
Posted: Thu Oct 07, 2004 10:00 pm
by ukandrewc
Yes, after the advice I have written my own mid function that uses pointers.
Thanks again everyone
Posted: Fri Oct 08, 2004 1:49 am
by jack
Dare2 wrote:hehe.
There is a thread here somewhere where large strings were discussed. (I can't find the thread now so maybe it was in th bugs area and dopped or maybe I am searching badly - but I remember seeing it)
From recollection (vague) the conclusion was that very large strings give the illusion of being OK, but cause probs down the track. There was also some sort of work-around which was hotly argued.
viewtopic.php?t=9194
Posted: Fri Oct 08, 2004 10:17 am
by ukandrewc
FYI
I discovered that there is a command for my problem, CopyMemoryString is documented in the help file
Thanks again