Jump to content
Sign in to follow this  
Newbie2

Strings, Quotes And Stuff

Recommended Posts

Newbie2

Hi Guys, sorry for this stupid question...

If I do this:

$string=("AB@CD=,123")
msgbox (0,"",$string)

It will result-->AB@CD=,123

But what 2 do if I want to result AB@CD=,"123","456",7 ?

I have found that there is a way using "&"

e.g.

$string=("AB@CD=,""" & "123" & """," & """" & "456" & """," & 7)
msgbox (0,"",$string)

Is there an other way? Can't I do:

$string=(AB@CD=,"123","456",7)
msgbox (0,"",$string)

Thanks-

Share this post


Link to post
Share on other sites
GrahamS

You can also use the single quote character, so try

$string=('AB@CD=,"123","456",7')

GrahamS

Share this post


Link to post
Share on other sites
herworth

You can do this:

$string = "ABC = ""123"" or ""678"""

MsgBox(0,"",$string)

You will get - ABC = "123" or "678"

[u][font="Arial"]Pete[/font][/u]

Share this post


Link to post
Share on other sites
GrahamS

P.S. look at item 7 in the FAQ. As it says, you can also double up the quote marks as follows:

$string=("AB@CD=,""123"",""456"",7")

but personally the single quote version looks better


GrahamS

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×