Welcome! Log In Create A New Profile

Advanced

How do you concatenate a string which include " " ?

Posted by DanM 
I am trying to create a string which will end up as ...

gResStart is a string = HTTPRequest("[www.galco.com]winking smiley

I am passing in 2 parameters to the procedure:

1. HTTP string (http://www.galco.com/scripts/cgiip.exe/wa/wcat/catalog.htm?searchbox=)
2. the part number (FZ1600)

BUT ... they need to be enclosed by the quotes " " ...

I have tried single quotes around the double quotes but everything I have tried ends up as an error or what is between the set of quotes is taken literally, not as the value of the variables??

Here is what I have tried ... (at least the one I thought made the most sense)
--------------------------------------------------------------------------------
webaddress is a string = (StockCheckString + PartNumber)
gResStart is a string = HTTPRequest(" + webaddress + ")
--------------------------------------------------------------------------------

help ... please ...
Dan,

To insert a double qoute into a string use Charact(34).

HTH
Merijn

I tried this ...

sStockCheckURL is a string = "[www.galco.com];
sPartToFind is a string = "FZ1600"
gResStart = HTTPRequest(Charact(34) + sStockCheckURL + sPartToFind + Charact(34))

... and I get no results back.

Can you provide more of an explanation or even an example.

thanks ... Dan
Hairy Haggis.pcs.crosspost
Re: How do you concatenate a string which include " " ?
July 13, 2009 09:30AM
Hi there,

Have you tried using ""string to enter""

ie MyParam is string = "Hairy"
MyStr = "hello """ + MyParam + """"

should be 'hello "Hairy"'

I havenot tested this just typed it in, but it should work...




DanM wrote in news message <76492009071217200354.31131@news.pcsoft.fr>:
>
>
> I am trying to create a string which will end up as ...
> gResStart is a string = HTTPRequest("[www.galco.com]winking smiley
> I am passing in 2 parameters to the procedure:
> 1. HTTP string (http://www.galco.com/scripts/cgiip.exe/wa/wcat/catalog.htm?searchbox=)
> 2. the part number (FZ1600)
> BUT ... they need to be enclosed by the quotes " " ...
> I have tried single quotes around the double quotes but everything I have tried ends up as an error or what is between the set of quotes is taken literally, not as the value of the variables??
> Here is what I have tried ... (at least the one I thought made the most sense)
> --------------------------------------------------------------------------------
> webaddress is a string = (StockCheckString + PartNumber)
> gResStart is a string = HTTPRequest(" + webaddress + ")
> --------------------------------------------------------------------------------
> help ... please ...
>

Message forwarded from pcsoft.us.windev
Piet van Zanten
Re: How do you concatenate a string which include " " ?
July 13, 2009 09:46AM
Hi Dan,

Try not using quotes. It is not necessary.

Regards,
Piet
Piet,

I believe this is an example where the Quotes are necessary ...

what do I do now ... ?

sPriceBreakQty = ExtractString(ExtractString(sAPriceBreakLine, 1, "[/td]"),2,"[td width="50%" align="center class"="regprice"]")

I need to enclose the

[td width="50%" align="center class"="regprice"]

in quotes to define the extraction string BUT there are quotes in the HTML surrounding 3 of the pieces of data??

How do I deal with this situation?

Dan
Ruben Sanchez Peña
Re: How do you concatenate a string which include " " ?
July 13, 2009 08:15PM
Hi. Replace the " char with a pair ""

sPriceBreakQty = ExtractString(ExtractString(sAPriceBreakLine, 1, "[/td]"),2,"[td width=""50%"" align=""center"" class=""regprice""]")

That did the trick !!! ... Thank you Ruben
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: