Arrayread and DEC modifier issue
I have a buffer containing this string:
To be sure I'm not lost in space :D here is the ascii scan of the buffer, that ends with a Carriage Returns 13:
Code:
[43][85][85][83][79][82][68][58][32][48][44][55][13]
I'm using Arrayread to capture the last "7" that can be a number of also 2 or 3 digits
Code:
arrayread BufferTemp ,20,NotFound,[WAIT("+UUSORD: ",44), DEC GPRS_SocketChar]
But it does not work and the code jumps to "NotFound"
As I'm reading on the manual, "DEC will wait for a recognized character to begin conversion, and automatically end conversion when an unrecognized character is encountered" so it should capture the "7" and exit when the next char(13) is found.
Can you see where I'm wrong ?
Re: Arrayread and DEC modifier issue
It is OK, that jumps to that label.
This sequence "+UUSORD: ",44 never arrive. All characters must be in sequence for single wait instruction.
You can do it like this
arrayread BufferTemp ,20,NotFound,[WAIT("+UUSORD: "), WAIT(44), DEC GPRS_SocketChar]
Re: Arrayread and DEC modifier issue
Thank you Pedja, you are right !
It was a very stupid mistake.
Cheers