GetPVProfString and Double Quotes (")

GetPVProfString and Double Quotes (")

Postby Barry O'Brien » Wed Jan 09, 2008 3:59 pm

Hi everyone,

I'm using GetPVProfString to return an entry from an ini file that contains double quotes ("). However the function is stripping off the quotes and just returning the data within the quotes.

An example:
Code: Select all  Expand view  RUN
[Test]
Entry=":"

GetPVProfString returns this entry as : and not ":".

If I add extra single quotes to the ini file entry:
Code: Select all  Expand view  RUN
[Test]
Entry='":"'

This returns ":".

I can use the second method as a work-around for now but would prefer to keep my ini file entries as simple as possible.

Is this how the function is supposed to work or is it a bug?

Kind regards,

Barry O'Brien
Barry O'Brien
 
Posts: 9
Joined: Tue Aug 28, 2007 9:09 am
Location: Oxford, England

Postby James Bott » Wed Jan 09, 2008 4:31 pm

Barry,

>Is this how the function is supposed to work or is it a bug?

I belive this is how it is supposed to work--so you can tell numbers from strings. E.G.

Entry="888"

Entry=888

Regards
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Barry O'Brien » Wed Jan 09, 2008 5:12 pm

Hi James,

I belive this is how it is supposed to work--so you can tell numbers from strings.


There is another function GetPVProfInt() for returning integers. I thought that GetPVProfString() would return the entire value of an entry as a string, regardless of quotes or any odd characters it might contain.

Then again, quotes within strings have always been a bit of a mine-field in any language! :roll:

Kind regards,

Barry O'Brien
Barry O'Brien
 
Posts: 9
Joined: Tue Aug 28, 2007 9:09 am
Location: Oxford, England


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 56 guests