Quotation marks

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by wayne1.

To have MessageRequester("","""test""",0) display "test"
or some other method to be able to display strings with quotation marks
(\" maybe)



Edited by - wayne1 on 06 December 2001 07:17:08
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by wavemaker.

The backslash should be cool to escape quotes and other uses may be: \n (LF), \t (TAB), and so on, like Perl.

Bye,

Juan Calderón Alonso
Registered user
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by PB.
To have MessageRequester("","""test""",0) display "test"
or some other method to be able to display strings with quotation marks
At the start of my apps I just put q$=chr(34), so taking your example
above I would then do it as MessageRequester("",q$+"test"+q$,0).


PB - Registered PureBasic Coder
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by wayne1.

Good tip, I didnt think about that
Thanks





Edited by - wayne1 on 07 December 2001 04:53:27
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by TronDoc.

I think the chr$ method is more "pure" BASIC
and using an escape character always needs a
work-around for including that character in
your output!

for example, if / is the escape character
then I have to output // to output the / character!

just-a-thought
Joe B.


elecTRONics DOCtor
I heal your sick equipment!
Post Reply