ph:
1. you should be assigning the pos as "55.841234" (because it is a string)
2. the note for the valpos will drop the last two digits, but still store
the value 55.841234
3. the difference, if you use the qq in [1] is 0.

When you assign 55.841234 to pos, MB must be using some internal function
and the last two digits are dropped.

hth
-John
 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 18, 2000 7:09 AM
To: [EMAIL PROTECTED]
Subject: MI string to value using val

I have a problem converting a string to a value
The problem is that "val" returns a value like 55.8412
The last to digits  are lost??

Include "MENU.DEF"
          Include "MAPBASIC.DEF"
          Include "ICONS.DEF"

          dim pos as string
          pos=55.841234
          dim valpos as float
          valpos= val(pos)
          note valpos

          dim result as float
          result = 55.841234 - valpos
          note result
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to