Grazzie Michele Patrick Michele Neri a écrit : > Patrick, > it's a bug in FBtoC. > > You can try a workaround, swapping the terms of the comparison: > > while space$(1) = left$$(gContainer,1) > gContainer = right$$(gContainer,len(gContainer)-1) > wend > > while space$(1) = right$$(gContainer,1) > gContainer = left$$(gContainer,len(gContainer)-1) > wend > > Michele. > >> I recently used the FN provided by Robert Purves in "Replace >> substring in a string" and was able to delete returns and line feeds >> in a 5-million character container in about 3 minutes instead of 3 >> hours (when using LEFT$$, RIGHT$$, and MID$$). This was in FB4 and FB5. >> >> I tried to add deletion of trailing spaces : >> >> while left$$(gContainer,1) = space$(1) >> gContainer = right$$(gContainer,len(gContainer)-1) >> wend >> >> while right$$(gContainer,1) = space$(1) >> gContainer = left$$(gContainer,len(gContainer)-1) >> wend >> >> and the program which works in FB4, hangs without warning in FB5. >> When this addition is included in RP's example "Replace substring in >> a string", it hangs also. In FBtoC help, left$$ and right$$ are not >> mentioned, even as nonimplemented. >> >> Thanks are due to the FB team for their fantastic work. >> >> Patrick >> >> -- >> To unsubscribe, send ANY message to: >> futurebasic-unsubscribe@... > > -- > To unsubscribe, send ANY message to: > futurebasic-unsubscribe@... > >