Go Down

Topic: Serial. println(""""); (Read 1 time) previous topic - next topic


Is it possible to serial print the sign " ?
I need to use that sign in AT command but clearly not possible if i try with:



Apr 20, 2009, 09:05 pm Last Edit: Apr 20, 2009, 09:08 pm by halley Reason: 1
When included in a string literal, a backslash means the next character is special.

Code: [Select]

\' for a single quote
\" for a double quote
\\ for a single backslash
\0 for a zero byte
\xFF for a byte with hex value 0xFF
\277 for a byte with octal value o277
\n for a newline
\t for a tab character

There's about ten others I'm too lazy to look up at the moment.  They're called escape sequences.  Only some of these are supported within character literals (those single-character strings in single quotes).


Apr 20, 2009, 09:37 pm Last Edit: Apr 20, 2009, 09:38 pm by HULK Reason: 1
Thanks a lot, it works!

Think that information should be added to the arduino reference area.


Apr 20, 2009, 09:48 pm Last Edit: Apr 20, 2009, 09:49 pm by halley Reason: 1
Yes, maybe it probably should be in the reference area.  However, for some reason the Arduino site doesn't really call much attention to the fact that the language is just a plain vanilla world-wide standard C++. Perhaps to admit that fact would intimidate a lot of newcomers who have heard that C++ is hard or something.  Anyway, to really learn the language of Arduino development, you have a lot of good resources on C++ already out there, maybe even in your local bookstore.

Go Up