ASCII parse problem

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
howard123
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

Post by howard123 »

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.
Attachments
IMG_1083.JPG
IMG_1083.JPG (116.42 KiB) Viewed 1931 times
debug trace
debug trace
IMG_1082.JPG (92.85 KiB) Viewed 1931 times
Controller A22 ascii range test A01.fcfx
(44.94 KiB) Downloaded 149 times

User avatar
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

Post by LeighM »

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.

howard123
Posts: 75
Joined: Thu May 24, 2012 1:15 pm
Location: Cape Town
Has thanked: 30 times
Been thanked: 28 times
Contact:

Re: ASCII parse problem

Post by howard123 »

Thanks Leigh that has worked.
Best health wishes to you all.

Post Reply