Shop OBEX P1 Docs P2 Docs Learn Events
How to compare input arrays to strings?? — Parallax Forums

How to compare input arrays to strings??

ArchiverArchiver Posts: 46,084
edited 2000-07-14 17:31 in General Discussion
Hi all,

I'm a bit stuck with a program I'm writing. Basically, I read a string of
nine bytes into a variable, set byte ten to zero, and then try to compare it
to three different strings, as

serin GSMIn,B9600,5000,Inicio,[noparse][[/noparse]WAIT ("INPUT:"), skip 1, STR InString\9]

InString(10) = 0

if (InString = "639328203") then U1

if (InString = "639108206") then U2

if (InString = "609748586") then U3

The error comes at the 'if' statement. Is it possible to compare the whole
string in one go, without having to address it byte-by-byte?

Any help greatly appreciated,

Mike
Sign In or Register to comment.