string delimiters
lfreeze
Posts: 174
After a few days of trial and error, I still cannot solve this coding problem.
I am working with a sim900 cell phone module, I have had success with sending txt and email messages.
I want to add a function to read received txt messages. In order to do this I must send this command
To the sim900 module AT+CMGL="ALL" , the quotations marks are part of the command.
My problem is I cannot include the additional quotation marks in my string command.
phone.str(string("AT+CMGL=(ALL)", 13))
Are there any wildcard delimiters that I can use instead of the quote marks? Is there
Another way to do this?
Thanks .
Larry
I am working with a sim900 cell phone module, I have had success with sending txt and email messages.
I want to add a function to read received txt messages. In order to do this I must send this command
To the sim900 module AT+CMGL="ALL" , the quotations marks are part of the command.
My problem is I cannot include the additional quotation marks in my string command.
phone.str(string("AT+CMGL=(ALL)", 13))
Are there any wildcard delimiters that I can use instead of the quote marks? Is there
Another way to do this?
Thanks .
Larry
Comments
I can't remember if there is a way of escaping a quote, must be in the manual if there is.
I'd be inclined to define the string in a DAT section. Something like:
I personally add (at Mike Green's suggestion) a constant declaration at the beginning of the program.
So then the above code becomes:
I don't think there's a way use double quotes in Spin code other than referring to it by ASCII number.
all the delimiters, but nothing for my situation
Larry