Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Outputting quotation marks
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Scott832




PostPosted: Tue Apr 22, 2003 4:58 pm   Post subject: Outputting quotation marks

How do you output quotation marks using Font.Draw and put?

For example: how would I output the text put "hello" (with the quotation marks)?
Sponsor
Sponsor
Sponsor
sponsor
Blade




PostPosted: Tue Apr 22, 2003 5:43 pm   Post subject: (No subject)

you have to use single quotes
Scott832




PostPosted: Tue Apr 22, 2003 5:49 pm   Post subject: (No subject)

do you mean I have to write it like this?

put "''hello''"
Catalyst




PostPosted: Tue Apr 22, 2003 5:56 pm   Post subject: (No subject)

you can put a \ before the quotes and it will work

for ex.

code:

put "\"hello\""
Scott832




PostPosted: Tue Apr 22, 2003 5:58 pm   Post subject: (No subject)

nevermind. I found another way.

You can either use your way (which works fine and I appreciate the help) or you can use a slash before the quotation marks you want to be outputted.

example: put "\"hi\""

works the same way with Font.Draw
Scott832




PostPosted: Tue Apr 22, 2003 5:59 pm   Post subject: (No subject)

oops, guess someone else posted while I was typing my last message.
Asok




PostPosted: Tue Apr 22, 2003 6:03 pm   Post subject: (No subject)

using put you can do something similar by using 2 ' instead of "

code:
put "''Who Goes There?''"


or you can use the ASCII value of "" via chr() function in this case it'd be put chr(34)

code:
put chr(34), "Who Goes There", chr(34)


this works also for Font.Draw

enjoy Smile
Asok




PostPosted: Tue Apr 22, 2003 6:11 pm   Post subject: (No subject)

ASCII OWNS \

USE TEH ASCII!!
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 8 Posts ]
Jump to:   


Style:  
Search: