I have a string, call it INPUT, and it is 16 chars long. how to I check the FIRST or LAST char? What I would like to do is something like:
if (input<<1) <> "*" then goto FAILURE
But that obviousley isn't how to do it.
HELP!!!!!!!!!!
I have a string, call it INPUT, and it is 16 chars long. how to I check the FIRST or LAST char? What I would like to do is something like:
if (input<<1) <> "*" then goto FAILURE
But that obviousley isn't how to do it.
HELP!!!!!!!!!!
Move the string into an array then you can check any of the array elements.
Code:SERIN2 PORTB.5,24972,[WAIT("A"),STR NUMS\16] IF NUMS[0] = ??? then ...
Dave
Always wear safety glasses while programming.
But it worked. That was staring me in the face. Cheers Dave, and thanks
I've been away from PBP for a couple of years, and a lot of 'STR' stuff is new to me. I always see STR arrays being loaded from the serial port. Here's my dumb question...
Is there a way to quickly load a STR array manually, i.e.
ARRY var BYTE[10]
ARRY = "Testing"
or something similar, or must we do it like:
ARRY[0] = "T"
ARRY[1] = "e"
etc.
etc.
Do a search for copystring, one of those 2 threads is right...well, the first few posts of it anyways should give you a few ideas.
That's very cool! Thanks.![]()
Last edited by circuitpro; - 10th December 2008 at 06:26.
Bookmarks