How do I include " in a string?

For questions about using Classic.

Post » Tue Sep 14, 2010 1:10 pm

Hey guys. I have a, what I guess is a, simple question. How would I use the character " in a string?

This:


Outputs (for example):
[code:2oz2y8gh]start /wait cmd /C slet_bruger_auto lbd[/code:2oz2y8gh]

But I want this output:
[code:2oz2y8gh]start "lbd" /wait cmd /C slet_bruger_auto "lbd"[/code:2oz2y8gh]
B
3
G
2
Posts: 11
Reputation: 697

Post » Tue Sep 14, 2010 1:23 pm

Double your double quotes. :D

"Hello" obviously just gives you: Hello

"""Hello""" would give you the output: "Hello"

"Hello ""Friend""" would give you the output: Hello "Friend"
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Tue Sep 14, 2010 2:34 pm

ah I knew it was something simple. Thank you :D

I already tried doing this: \" because that's how I do it in PHP. It changed the color of the string but still didn't work.
B
3
G
2
Posts: 11
Reputation: 697


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests