Search code examples
basicplc

BASIC - How to include double quotes in string?


I'm using the BASIC language. Is there any way to include double quotes in a string?

I tried using \" but it doesn't work.

NOTE: I'm using Nano-10 PLC which supports combination of Ladder and BASIC


Solution

  • @vlad awtsu's answer is correct for the normal BASIC language. (+1 for him)

    However it didn't work for me on the PLC I've mentioned in the question.

    Using CHR$(&H22) did the job for me. (also works on normal BASIC)

    Print "Hello "+ CHR$(&H22) +"World"+CHR$(&H22)
    

    It prints:

    Hello "World"