Topic: MapInfo Decimal Problem

Here's a quick technical conundrum which I would imagine should pose no problems for LRC GIS experts.

I have updated a column in a MapInfo table with a calculated percentage.  The column was originally set to decimal, with a width of four and two decimal places (which I assumed would allow for numbers up to 99.99).  The problem is that the column will not display any numbers of ten or above.  I have tried setting the column to float, and the same thing happens, and the default setting for decimal which appears to be a width of eight with six.  Any of percentages that are ten or more appear as 9.99 or 9.990, 9.9900 etc (depending on the setting).

Does this make sense?

Can anyone help?

Thanks,

Tom Hunt - ALERC National Coordinator

Re: MapInfo Decimal Problem

Hi Tom,

Hope I understand your question correctly. I just did a test in MapInfo and both float and decimal can store 99.99. But decimal truncated to 9.xx if the width set to 4 and decimal of 2 then if I set the width to 5 it works.

Hope that help,
Luck

rECOrd

Re: MapInfo Decimal Problem

Hi Tom,

The decimal size includes both the decimal point and the number after the decimal so if you specify 4 with 2 after the decimal the point is counted so if you want NN.DD you would have to set the width to 5

As an aside, if you have a float field and only want to label to 2 decimals you can use Format$(fieldname,"#0.#0") in the label expression.

Mark

Mark Percival
Senior GIS Officer
Rugby Borough Council

Re: MapInfo Decimal Problem

Thanks everyone.  I actually removed the column, added a new one, repopulated it and displayed what I wanted.  The strange thing was that originally it was never displaying numbers above ten whatever setting I chose.

I hadn't realised the width included the point itself, so that is useful information for the future thanks.

Regards,

Tom Hunt - ALERC National Coordinator