Hello all,
I am trying to parse a certain range of ASCII values bounded at decimals 48 and 122.
The input is “+++abcde}}}” and I would expect to get “abcde” but I instead get “abcde67891234567..”.
Notice that StringCellNumber=”” is after StringCellNumber=123456789123456789. Notice also that the number of characters is more than the number of loops(11).
If I remove the parse loop (shown screenshot) I correctly get nothing on the display for StringCellNumber (StringTestTwo).
On my debug pic the top line is StringTestOne and the lower StringTestTwo.
Any ideas? thanks Howard.
ASCII parse problem
Moderator: Benj
-
- Posts: 75
- Joined: Thu May 24, 2012 1:15 pm
- Location: Cape Town
- Has thanked: 30 times
- Been thanked: 28 times
- Contact:
ASCII parse problem
- Attachments
-
- IMG_1083.JPG (116.42 KiB) Viewed 2083 times
-
- debug trace
- IMG_1082.JPG (92.85 KiB) Viewed 2083 times
-
- Controller A22 ascii range test A01.fcfx
- (44.94 KiB) Downloaded 157 times
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: ASCII parse problem
You need to add a final null (0) after the last character written into StringCellNumber
This terminates the string.
Otherwise any preexisting characters in the array will be included in the string.
This terminates the string.
Otherwise any preexisting characters in the array will be included in the string.