GetPVProfString and Double Quotes (")

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

GetPVProfString and Double Quotes (")

Post by Barry O'Brien »

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

[Test]
Entry=":"
GetPVProfString returns this entry as : and not ":".

If I add extra single quotes to the ini file entry:

Code: Select all

[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
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Post by James Bott »

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
Barry O'Brien
Posts: 9
Joined: Tue Aug 28, 2007 9:09 am
Location: Oxford, England

Post by Barry O'Brien »

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
Post Reply