CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Syntax issue for strings

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
umutso



Joined: 23 Jan 2013
Posts: 39
Location: turkey

View user's profile Send private message MSN Messenger

Syntax issue for strings
PostPosted: Thu Jan 31, 2013 4:25 am     Reply with quote

Hi all,

I'm trying to detect a string array that I'm getting from the serial comm. Eg . there are lots of information sent via serial port and I just need a certain bunch of this string and need my MCU use it as a getch().

The string comes via serial : [00:00:27]Channel[0]-->>Login success

My getch() function awaits only "Login success" which is inside the above string.

So what I have to do is to make my program see "Login success" inside the bunch of strings and triggered.

How can I do this since I'm a newbie with C++.

Thanks in advance,

US
_________________
Umut Sonkurt
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

PostPosted: Thu Jan 31, 2013 8:24 am     Reply with quote

CCS is 'C' not 'C++'.

However, CCS compiler includes several string compare routines.
Or you could analyse the input string by looking for the first 'L' followed by 'o'... 'til you get to the final 's'.

Mike
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group