News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

Insert " character into a string ?

Started by CPR, Feb 01, 2025, 11:31 AM

Previous topic - Next topic

CPR

Scratching my head how to insert the " (double quote) character into a string. Long ago in Basic I'd have used CHR$(34)

I have a string of text which reads -
"IX.txt=" + message
Where message is a string containing some text
I want to enclose (the text inside) the message string with double quotes like so
"IX.txt=" + " + message +"
Anyone know how this can be achieved?

trastikata

Create string: "Hello" World

sMyString = 34 + "Hello" + 34 + " World"

CPR

As simple as that. Well, I'm blowed. That works perfectly. Thank you  :)