#1 (permalink)  
Old 05-04-04, 09:35 PM
OMID SOFT OMID SOFT is offline
Newbie Coder
 
Join Date: Apr 2004
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation variable

How to assign a string with " inside it to a variable ?
If we try to :
strFirst = "var1"var2"
The following error will occur :
Expected: end of statement
Thank you.
Omid Soroori of OMID SOFT.
Reply With Quote
  #2 (permalink)  
Old 05-05-04, 07:31 AM
kebo kebo is offline
Newbie Coder
 
Join Date: Apr 2004
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by OMID SOFT
How to assign a string with " inside it to a variable ?
If we try to :
strFirst = "var1"var2"
The following error will occur :
Expected: end of statement
Thank you.
Omid Soroori of OMID SOFT.
use chr$(34)

s = "Assign a quote " & Chr$(34) & " to a string"
kevin
Reply With Quote
  #3 (permalink)  
Old 05-05-04, 11:21 AM
kasic's Avatar
kasic kasic is offline
Newbie Coder
 
Join Date: Apr 2004
Location: Serbia
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kebo
use chr$(34)

s = "Assign a quote " & Chr$(34) & " to a string"
kevin
what does $ sign mean?
Reply With Quote
  #4 (permalink)  
Old 05-05-04, 11:58 AM
kebo kebo is offline
Newbie Coder
 
Join Date: Apr 2004
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by kasic
what does $ sign mean?
I the old days it respersented a string variable. In this case Chr$ is the same as CHR and is left over from days of old
kevin
Reply With Quote
  #5 (permalink)  
Old 05-05-04, 06:10 PM
kasic's Avatar
kasic kasic is offline
Newbie Coder
 
Join Date: Apr 2004
Location: Serbia
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks for that infomation I thought that $ sign ment for some binary works or I don't know what esle becouse I have seen $ in some other persons code and I thought that Chr$ and Chr is accually the same thing, but I haven't been sure... thanks

Last edited by kasic; 05-05-04 at 06:13 PM.
Reply With Quote
  #6 (permalink)  
Old 05-05-04, 06:20 PM
OMID SOFT OMID SOFT is offline
Newbie Coder
 
Join Date: Apr 2004
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Exclamation Answer !!!

No !
If we want to assign this string to a variable :
Var1 = "fp"sp"
There will be an error !
You should use the double " like this :
Var1 = "fp""sp"
That's all.
Have a nice day.
Omid Soroori of OMID SOFT.

Last edited by OMID SOFT; 05-05-04 at 06:25 PM.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Place Image on text according to variable perleo PHP 18 01-10-06 10:21 AM
Sending a variable to a page redirected to with header() ? Frank PHP 3 05-19-04 08:02 AM
Dreamweaver changes form variable when a cut/paste is done Thor135 The Lounge 2 02-20-04 12:37 PM
Function and variable problem perleo PHP 1 02-11-04 08:52 PM
Call a variable name dynamically Kenrette ASP 2 11-12-03 09:48 AM


All times are GMT -5. The time now is 01:20 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.