Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where do I send VFP bugs to?
Message
From
24/06/2001 23:27:53
 
 
To
24/06/2001 23:06:01
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00522896
Message ID:
00522936
Views:
7
Steve,

>>Steve,
>>
>>>>Tom,
>>>>
>>>>The limitation is actually 255 characters. If you make a to equal 255 characters the function works. At 256 it fails.
>>>>
>>>>However, if you make the characters different like this:
>>>>
>>>>a=REPLICATE("X",100) + REPLICATE("Y",100)+REPLICATE("Z",100)+REPLICATE("Q",100)
>>>>
>>>>?ATC("Q",a)
>>>>
>>>>Then the ATC command correctly returns 301.
>>>>
>>>>Apparently there is a limitation if the characters are all the same. I'd guess that internalls VFP parses the string to separate 255 length 'sub' stings.
>>>>
>>>>
>>>Hey Doug,
>>>
>>>From the docs:
>>>
>>>
>>>Both cSearchExpression and cExpressionSearched can be memo fields of any size.
>>>
>>>
>>>It does appear to be a bug...I guess not that many people have had to do case insensitive searches for long strings for it to live this long.
>>
>>No argument from me but the behavior I encountered leads me to believe that internally the strings are somehow parsed into groups. In my example I exceeded the 300 characters but only by changing the character itself..
>>
>>Interesting.
>
>You exceeded 255 characters on the second argument, but not the first. The bug is when the first argument is long.


In the original post by Tom Green he had a string of 300 X's. That indeed does not work and returns a zero. I reduced that to 255 characters and it worked. I made it 256 characters and it did NOT work. I then made the above example which is actually 400 characters in length and the ATC() command also worked but there were different characters in the striing with no one 'chunk' more than 255 characters in length.

If there's a bug, and I think there may well be, it would have to be closely defined as a this: The ATC() command incorrectly returns a sero (0) when the string being examined 1) is over 255 characters in length and 2) consistes of all the same character.

All other cases I've tested work it seems, including a memo field of 3000 X's.
Best,


DD

A man is no fool who gives up that which he cannot keep for that which he cannot lose.
Everything I don't understand must be easy!
The difficulty of any task is measured by the capacity of the agent performing the work.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform