Go Down

Topic: serial communication problem (Read 885 times) previous topic - next topic

PaulS

Quote
Why the ">=0"?

Because indexOf() returns the offset from the beginning of the String to the searched for string. The searched for string could be at the start of the searched String, so offset would be 0. It could be somewhere else, so offset would be > 0. It could not exist, so offset would be -1.

zoomkat

Quote
Why the ">=0"?


In this case it is copy/paste carryover from serial code that does not use a delimiter. You should be able to remove it if desired.
Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   8)

Tyger

thank you for the help and info

Go Up