[futurebasic] Re: [FB] left$$ and right$$ in FB5

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 2008 : Group Archive : Group : All Groups

From: Patrick GRIMONT <pgrimont@...>
Date: Mon, 20 Oct 2008 19:06:58 +0200
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@...
>
>