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

hex escape sequence problem

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







hex escape sequence problem
PostPosted: Tue Jun 19, 2007 12:11 pm     Reply with quote

The following sprintf gives compile error 116 (wrong count).

sprintf(strTime, "\xfe\x79\x00\x01%02i-%02i-%02i %02i-%02i-%02i", bcdToBin(d.yr8), bcdToBin(d.mo8), bcdToBin(d.da8), bcdToBin(t.hr8), bcdToBin(t.mi8), bcdToBin(t.se8)); // 24 hour time

If I remove the hex escape sequences it's ok. How come?

Jay
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jun 19, 2007 12:31 pm     Reply with quote

It doesn't like the \x00. It thinks you're trying to terminate the string.
Jay Hanson
Guest







PostPosted: Tue Jun 19, 2007 1:47 pm     Reply with quote

Tnx!

Jayjavascript:emoticon('Laughing')
Laughing
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