 |

03-09-2007, 12:16 PM
|
|
Regular
|
|
Join Date: Aug 2004
Posts: 84
|
|
Using " in a string?
|
Hi,
Im wondering, how to i put a " thing in a string?
like
text1.text = ("Install path = "C:\windows"")
If i use that tho, it will say "Error: Expected )" soo...
Thanks
Gr. Ron
|
|

03-09-2007, 12:21 PM
|
|
Senior Contributor
Forum Leader
|
|
Join Date: Oct 2003
Location: Central Florida
Posts: 1,205
|
|
Code:
Text1.Text = "Install path = ""C:\windows"""
Inside the delimiting quote marks, it takes a double " to generate a single ".
|
__________________
-- D.J.
I do not endorse any items advertised within this frame, and regret that the viewer is subjected to such.
|

03-10-2007, 12:28 AM
|
 |
Ultimate Antique
Administrator * Expert *
|
|
Join Date: Sep 2005
Location: Maldon,Essex, UK
Posts: 3,939
|
|
You could also use
Code:
Text1.Text = "Install path = " & Chr(34) & "C:\windows" & Chr(34)
I think it's a bit easier to read (well with my eyes it is  ), but it is less efficient
|
__________________
semel insanivimus omnes
S Data in context = Information, S Information in context = Knowledge, S Knowledge in context = Experience
S Experience in context = Wisdom= Data
|

03-12-2007, 08:39 AM
|
|
Senior Contributor
Forum Leader
|
|
Join Date: Oct 2003
Location: Central Florida
Posts: 1,205
|
|
Quote:
Originally Posted by DougT
. . .
I think it's a bit easier to read . . .
|
And, I agree. In fact, I don't like all that Chr$() stuff all over the place, so I'll usuallly assign
And use that.
You can even define a left quote (Lq$ = Chr$(34)) and a right quote (Rq$ = Chr$(34)), even if the value is the same, to help you keep track of 'em.
Code:
Print #1, Lq$ & "Look out," & Rq$ & " he said, " & Lq$ & "There it is!" & Rq$
That must violate most rules of style, but it helps.
|
__________________
-- D.J.
I do not endorse any items advertised within this frame, and regret that the viewer is subjected to such.
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|