quote in string

Just starting out? Need help? Post your questions and find answers here.
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 flim.

how to put " in string variable?
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 Paul.

chr(34)

Text$="This is a "+chr(34)+"BIG"+chr(34)+" test"
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 merendo.

Chr() makes it possible, to write all existant letters and symbols in a string. ASCII (American Standarts Code for Information Interchang)-Codes are used with it. If I find a list with them, I will inform you.

Greetings, merendo

We always need to hear both sides of the story (by Phil Collins)
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.

For n = 1 To 256
;TheChar$=Chr(n)
show$="character "+Chr(n)+" has ascii value: "+Str(n)
Print (show$)
Next n


elecTRONics DOCtor
{registeredPB}P150 32Mb w98/DOS/Linux NO DirX NO IE :wink:
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 tinman.
For n = 1 To 256
;TheChar$=Chr(n)
show$="character "+Chr(n)+" has ascii value: "+Str(n)
Print (show$)
Next n
Except printing non-printing characters isn't fun (well, it is, but you won't see much :wink:

This page has the ASCII codes - http://www.robelle.com/library/smugbook/ascii.html

However, most programming books will also have it, and I'm sure searching for "ASCII codes" on Google will return enough copies of it :)

--
It's not minimalist - I'm increasing efficiency by reducing input effort.
Post Reply