Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Leadorn

vb special characters

This topic is 5574 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Im not a vb programmer and im stuck with some simple problems, how do i print \" \n... with writeline outputfile.WriteLine "membersingroup.vbs " & "\"" & Groupname & "\""

Share this post


Link to post
Share on other sites
Advertisement
i''ve always done it this way, for example:

MsgBox Chr(34) & "test" & Chr(34) & vbCrLf & "test line 2"

where Chr(34) gives you a double quote and the vbCrLf gives you a carriage return linefeed.

Share this post


Link to post
Share on other sites
vbCrLf is good for line breaks. But for double quotes, just use "" -- that''s two double quotes in a row. Its much cleaner:

MsgBox "Your name is ""Joe"" isn''t it?"
MsgBox """Joe"" is your name isn''t it?"
MsgBox "Isn''t your name ""Joe?"""

All are valid in VB.

Share this post


Link to post
Share on other sites
quote:
Original post by ApochPiQ
vbCrLf is good for line breaks. But for double quotes, just use "" -- that''s two double quotes in a row. Its much cleaner:

MsgBox "Your name is ""Joe"" isn''t it?"
MsgBox """Joe"" is your name isn''t it?"
MsgBox "Isn''t your name ""Joe?"""

All are valid in VB.


are you absolutely certain about that? i no longer have VB installed or i''d check it out, but i used to use it a LOT, and i don''t think that is valid...

Share this post


Link to post
Share on other sites
Yep, it is valid

"I woke up sweating and clutching my pillow. Thankfully the powerful and reassuring visage of Optimus Prime staring back at me from my pillow case served to ease my frayed nerves. Like the giant robotic father I never had he always knows just what to say" - Gabe, Penny-Arcade

Alexandre Moura

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!