----- Original Message ----- 
From: "digeteca" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 18, 2001 11:14 AM
Subject: MI-L Truncating float number


> Hello,
> 
> using the following code :
> 
> dim value as float
> value=45.45678978
> note value
> 
> -> mapinfo print 45.4568

MapInfo is not actually truncatig your floating-point value; "float"
gives you 16 or 17 significant digits.

When MapInfo converts a float to a string, however, the string 
is based upon an internal format.  MapInfo rounds the number
to a value that fits in the number of significant digits specified 
by the format, which in your case is six.

The format used when you start up MapInfo is the one set up for
Windows.

You can actually change this default format from your Windows
Control Panel, selecting the "Regional Settings" applet, 
then the "Numbers" tab. 

Use a Set Format statement to set MapInfo's internal format after
it starts up, or Format$() to format an individual number.

HTH
Spencer




_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.

Reply via email to