View previous topic :: View next topic |
Author |
Message |
Jay Hanson Guest
|
hex escape sequence problem |
Posted: Tue Jun 19, 2007 12:11 pm |
|
|
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
|
|
Posted: Tue Jun 19, 2007 12:31 pm |
|
|
It doesn't like the \x00. It thinks you're trying to terminate the string. |
|
|
Jay Hanson Guest
|
|
Posted: Tue Jun 19, 2007 1:47 pm |
|
|
Tnx!
Jayjavascript:emoticon('')
Laughing |
|
|
|