# VHDL Delimiter Character

I'm trying to define a string in VHDL with a pair of double quotes in the string itself. However I am unable to do so because the IDE (Xilinx ISE 14.7) only recognizes what's in-between the first pair of double quotes as the string. Is there some kind of delimiter or escape character I can use?

Here's the string definition:

constant AT_WKMOD       : string(1 to 15):="AT+WKMOD="SMS""&CR;


If I try:

constant AT_WKMOD       : string(1 to 15):="AT+WKMOD=/"SMS/""&CR;


It does the same thing. The last thing I tried was:

constant AT_WKMOD       : string(1 to 15):="AT+WKMOD=\"SMS\""&CR;


Which gives the following error upon synthesis:

Non-printing character is not allowed in extended identifier.

• IEEE Std 1076-2008 15.7 String literals "A string literal has a value that is a sequence of character values corresponding to the graphic characters of the string literal apart from the quotation mark itself. If a quotation mark value is to be represented in the sequence of character values, then a pair of adjacent quotation marks shall be written at the corresponding place within the string literal. ... The length of a string literal is the number of character values in the sequence represented." – user8352 Mar 17 '19 at 7:45
• constant AT_WKMOD: string (1 to 15) := "AT+WKMOD=""SMS""" & CR; – user8352 Mar 17 '19 at 7:54
• @user8352 Thank you! That worked. – Simeon R Mar 17 '19 at 9:07
• Apart from doubling the quotes (the right method) you can always create a string by concatenation, "AT+WKMOD=" & '"' & "SMS" & '"' & CR; as you are already doing with CR. Note '"' is a character literal, i.e. a " enclosed in a pair of 's – Brian Drummond Mar 17 '19 at 12:52

constant AT_WKMOD: string (1 to 15) := "AT+WKMOD=""SMS""" & CR;

As an alternative, you can always create a string by concatenation, "AT+WKMOD=" & '"' & "SMS" & '"' & CR; as you are already doing with CR. Note '"' is a character literal, i.e. a " enclosed in a pair of 's.