I must retrieve values from a text files. I use a mid$() to extract the string and I store in a table the value obtained by VAL(), a very standard procedure.
While checking the results, I discovered that the stored values are not exactly the values in the text file. The differences are mainly for numbers with originally 4 decimals. The stored values are rounded up even if I use a format$() to make sure that the 4 digits are printed (In some cases the stored values look rounded but the decimal digits can be there). Here is an example from within the MapBasic window: "259.9995" read as a string variable and converted into VAL() prints as 260 but with a FORMAT$(val( ),"#.####") gives the original 259.9995 However, the same value stored in a table reads 260 and prints with a format$() as 260.0 As an extension to that observation: all 4 decimal digit numbers are stored with 3 decimal digits, with rounding on the 3th digit (or preceding one...) The column is dim'ed as float. MB/MI 6.5 Is there a way to "force" the stored value to be exactly what is read in the input file? I.e. to control the number of decimals in a float column? TIA Jacques Paris e-mail [EMAIL PROTECTED] MapBasic-MapInfo support http://www.paris-pc-gis.com --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 9404
