Hi Guys
How would I send a string like this AT+CSCS="GSM" with the inverted commas included
I have tried
String = "AT+CSCS="
String = String + ""GSM""
But this formula is not right
Sending String with inverted commas as part of it
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Sending String with inverted commas as part of it
Hello,
This is the way I might do it.
"AT+CSCS=\"GSM\""
The slashes in front of the speech mark allows it to be escaped.
https://en.wikipedia.org/wiki/Escape_sequences_in_C
This is the way I might do it.
"AT+CSCS=\"GSM\""
The slashes in front of the speech mark allows it to be escaped.
https://en.wikipedia.org/wiki/Escape_sequences_in_C
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- jollybv
- Flowcode v5 User
- Posts: 374
- Joined: Thu Feb 12, 2009 5:20 am
- Location: Cape Town
- Has thanked: 81 times
- Been thanked: 25 times
- Contact:
Re: Sending String with inverted commas as part of it
Hi Ben
Thanks for the reply i managed to sort it looking back at some old code
send = "AT+CSCS="
send = send + "\""
send = send + "GSM"
send = send + "\""
But I will use your code as it is way less code
Thanks for the reply i managed to sort it looking back at some old code
send = "AT+CSCS="
send = send + "\""
send = send + "GSM"
send = send + "\""
But I will use your code as it is way less code