Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parsing Puzzle (VFP bug?)
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00605723
Message ID:
00605892
Views:
13
Interesting... ATC_C works OK with my test case but ATCC doesn't.

Of course my test case does have equivalent case throughout (so even AT works) but the real world doesn't always.

But frankly I never would have thought to use it because I always thought it was restricted to DBCS only. On re-reading I see I was wrong (on yet another).

Jim


>Try AT_C()
>inplace of ATC()
>
>Worked for me with your code
>
>>I have a puzzle for anyone interested. One of my programs fails the ATC command looking for a var of 269 characters in a larger one of about 12000 characters. I did some tests and discovered that ATC fails sometimes. I can modify my program to use only 255 characters of the var and it works but it is not as perfect as I would like it. Can anyone explain the behaviour as shown below?
>>
>>parsetag.prg Imitates my program. ATC fails. But using AT works. So I tried with generic variables and ATC does not fail. I can't explain this.
>>
>>Thanks to any one who tries.
>>
>>
>>*parsetag.prg
>>LOCAL lcTag, lcHtml
>>lcTag = [~SELECT NAME='cboempguid' ID='cboempguid' SIZE='1' ] + ;
>>        [STYLE='BACKGROUND:~%=IIF(poError.EmpGuid, 'red', ] + ;
>>        ['#FFFFFF')%~;FONT:normal normal 9pt Arial;HEIGHT:24;] + ;
>>        [LEFT:310;POSITION:ABSOLUTE;TOP:0;WIDTH:194' ] + ;
>>        [VALUE='~%=potravail.empguid%~' ] + ;
>>        [~%=IIF(PLDISABLEEMPLOYES,'DISABLED','')%~~]
>>lcHtml = REPLICATE('0', 1800) + lctag + REPLICATE('0', 11000)
>>? ATC(lctag, bbb)  && result is 0
>>? ATC(UPPER(lctag), UPPER(bbb))  && result is 0
>>? AT(lctag, bbb)  && result is 1802
>>
>>? ATC(LEFT(lctag, 255), bbb)  && result is 1802
>>
>>*parsebbb.prg  && ATC works
>>*tag is not valid - I had to change some info so UT could accept the message
>>LOCAL aaa, bbb
>>aaa = REPLICATE('12345678', 64)
>>bbb = 'a' + REPLICATE('b', 1800) + aaa + REPLICATE('b', 11000)
>>? ATC(aaa, bbb)  &&result is 1802
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform