E edgar_ortiz Active Member Licensed User Longtime User May 18, 2012 #1 Hi, I'm trying to generate multiple strings from a string and fails when execute the substring. Ofcourse the values are within range. Any help is appreciate. Is this a bug? regards, Edgar Attachments Test_WebService.zip Test_WebService.zip 4 KB · Views: 522 log.txt log.txt 6.6 KB · Views: 549
Hi, I'm trying to generate multiple strings from a string and fails when execute the substring. Ofcourse the values are within range. Any help is appreciate. Is this a bug? regards, Edgar
specci48 Well-Known Member Licensed User Longtime User May 18, 2012 #2 SubString2 uses two parameters, BeginIndex and EndIndex. EndIndex should not be smaller than BeginIndex but if I look at your posted debug information, the values are BeginIndex = loFirstByte = 46 EndIndex = loNumBytes = 44 I haven't looked closer to your project but I think line 202 should be corrected to Code: lcData = lcWorkData.SubString2(lcFirstByte, lcLastByte) or Code: lcData = lcWorkData.SubString2(lcFirstByte, lcLastByte + 1) to include the last byte. specci48 Upvote 0
SubString2 uses two parameters, BeginIndex and EndIndex. EndIndex should not be smaller than BeginIndex but if I look at your posted debug information, the values are BeginIndex = loFirstByte = 46 EndIndex = loNumBytes = 44 I haven't looked closer to your project but I think line 202 should be corrected to Code: lcData = lcWorkData.SubString2(lcFirstByte, lcLastByte) or Code: lcData = lcWorkData.SubString2(lcFirstByte, lcLastByte + 1) to include the last byte. specci48
E edgar_ortiz Active Member Licensed User Longtime User May 18, 2012 #3 THANK YOU VERY MUCH :wav: specci48 said: SubString2 uses two parameters, BeginIndex and EndIndex. EndIndex should not be smaller than BeginIndex specci48 Click to expand... I did not see :BangHead: I checked mote than 10 times and I did not see :BangHead: Best Regards Edgar Upvote 0
THANK YOU VERY MUCH :wav: specci48 said: SubString2 uses two parameters, BeginIndex and EndIndex. EndIndex should not be smaller than BeginIndex specci48 Click to expand... I did not see :BangHead: I checked mote than 10 times and I did not see :BangHead: Best Regards Edgar