Announcement

Collapse
No announcement yet.

Passing double quotes in a string variable

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Passing double quotes in a string variable

    Hi, i have run into a problem in passing a string variable to a shelled c++ program. In the case when the string variable has spaces in it the the passed variable is not entirely read.

    However, if i can get double quotes into the variable, it should be able to accept it. How does one put quotes inside a string variable?

  • #2
    http://www.daniweb.com/forums/thread36515.html

    Problem solved, by using Chr$(34)...sorry for the post...

    Comment


    • #3
      T$ = "hello" & $DQ & "world" & $DQ
      hellobasic

      Comment


      • #4
        Another way is putting two quotes next to each other, at least it works in PB9:

        T$ = "hello ""world"""

        this will make T$ actually equal:
        hello "world"
        Thank you,
        Ryan M. Cross

        Comment


        • #5
          s = CHR$("Hello, ", $DQ,"world",$DQ,"!")
          How long is an idea? Write it down.

          Comment

          Working...
          X