Shop OBEX P1 Docs P2 Docs Learn Events
Compare string — Parallax Forums

Compare string

Hi,

I am using Parallax Wifi module in transparent mode. I am sending commands from my computer with a TCP apps.
With SERIN, I retrieve the string with an array.
I would like to compare this array within a if statement.
Exemple :
string var byte(4)

if string="ok" then
goto "do something"
endif

How can I do this?

Thanks

Chris

Comments

  • Stamp Basic doesn't directly support strings, so you have to do it by hand. Here is a pointer to a discussion we had about parsing strings.
    If you just want to look for a single case ("ok"), you can just do two compares but if you want to cover many input words, read the thread.
  • Thanks Tom,
    It will do the job.

    Chris
Sign In or Register to comment.