Register Login

How to embed double quote character in variable?

Updated May 18, 2018

I am trying to create a variable containing text and number sizes with double quote characters to represent inch measurements.

Example, I have two variables, one for the size of the pipe and the second for the size of the water meter. I want to create a string variable that would look like the string below, but I cannot seem to figure out how to do it.

INSTALL NEW 3/4" SERVICE WITH A 5/8" METER

In the example above, the pipe size is 3/4 and the meter size is 5/8. Each are string variables as shown below.

Set V[iw_pipe_size] "3/4"
Set V[iw_meter_size] "5/8"


I have tried variations of:
Set V[iw_wo_text] "INSTALL NEW &V[iw_pipe_size]" SERVICE WITH A &V[iw_meter_size]" METER"

but I cannot get the double quote characters representing the inch measurement to display correctly.

Any suggestions on how to embed the double quote characters are appreciated.

Brian


Comments

  • 03 Feb 2012 7:35 am Shalesh Singh Visen
    Brian: in a text string, double the double quote characters, e.g.

    Set V[size] " 3/4"" "

×