How to compare input arrays to strings??
Archiver
Posts: 46,084
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
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