FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour GetPVProfString and Double Quotes (")
Posts: 9
Joined: Tue Aug 28, 2007 09:09 AM
GetPVProfString and Double Quotes (")
Posted: Wed Jan 09, 2008 03: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:
[Test]
Entry=":"

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

If I add extra single quotes to the ini file entry:
[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
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
GetPVProfString and Double Quotes (")
Posted: Wed Jan 09, 2008 04: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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 9
Joined: Tue Aug 28, 2007 09:09 AM
GetPVProfString and Double Quotes (")
Posted: Wed Jan 09, 2008 05: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! :-)

Kind regards,

Barry O'Brien

Continue the discussion