Dear Giorgio
I cannot see the point in doing this. Computers work best with binary
representation of numbers. If you need to hold 12345.6789 setting a type
of float will take up only eight bytes of memory and will hold 14
significant figures with a number of any size.
When you come to do any arithmetic the number needs to be in a binary
form.
If you can dim as decimal then you take up more space and the program
would need to convert from string to binary and back again each time you
do any arithmetic.
I can see that you may want a field in a table to be defined as decimal
( Early foxpro dbf for example ). This however would be done on defining
the table and would not need a dim.
If you can dim as decimal I am not sure what the length reserved would
be. Perhaps this is why your number gets truncated.
Can you say why you want to use Decimal and what the problem with float
might be?
Regards
Bob
In message <[EMAIL PROTECTED]>,
Giorgio Porta <[EMAIL PROTECTED]> writes
>Hi to All,
>I would like to know, if anyone has ever used the decimal data type (for
>example Dim num As Decimal...)
>When trying to recover the number corresponding to the string in an edit
>text, using the Val() function i have this problem:
>
>Ex: num = 12345.6789 Val (num) = 12345.68
>
>How can i recover the effective num without loosing the decimals ?
>
>Thank you in advanced to all
>
>
>Giorgio Porta
>
>DOMINO Research S.r.l.
>Via Alserio 10 20159 Milano
>Tel +39 02 69006705
>e-mail [EMAIL PROTECTED]
>
--
technical support
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]