Compare string


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"

How can I do this?




  • 2 Comments sorted by Date Added Votes
  • 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.
    Re-inventing the wheel is not a waste of time if, when you are done, you understand why it is round.
    Cool, CA, USA 95614
  • Thanks Tom,
    It will do the job.

Sign In or Register to comment.