Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20757

BASCOM-AVR : Inconsistency with Left() : REPLY

$
0
0
This may not be a solution, but I found that its safer to parse incoming strings using INSTR rather than LEFT or MID functions. Then leading junk on the string is ignored, rather than causing a false negative. Eg if looking for "POST" in the string buffer, use dim btemp as byte btemp = INSTR(buffer,"POST") if btemp > 0 then 'Post will be detected here, even if the buffer contains "xxxPOSTyyy" end if Means you cannot use SELECT...CASE, but it seems better for other reasons.

Viewing all articles
Browse latest Browse all 20757

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>