Hi Henrik,


  • i VAR BYTEDataIn VAR BYTE[16]ActualData VAR BYTE [6]' DataIn is 16 bytes containg A A A A A H A N S O N E E E E E' Verify that the first 5 bytes are all "A"For i = 0 to 4 If DataIn[i] <> "A" THEN GOTO Start ' Nope, not qualified, start over...NEXT' Verify that the last 5 bytes are all "E"For i = 11 to 15 If DataIn[i] <> "E" THEN GOTO Start ' Nope, not qualified, start over...NEXT' Yes, header and footer qualified. Now extract actual data, 6 bytes, store in array ActualDataFor i = 5 to 10 ActualData[i-5] = DataIn[i]NEXT


If first 5 bytes received are correct then GOTO start. In this case if first 5 bytes received correctly and last 5 bytes are wrong? It runs "start" subroutine without checking the last 5 bytes?

Regards