VB doesn't understand!
Public Type tMan
x as integer
y as integer
End Type
Public Man as tMan
Man.x = 1200.001
Man.y = 100
Text1.text = Man.x + Man.y
Text1.text = 1300
Text1 for some reason leaves out the decimals!!! WHY?? Please help.
Thanks
Your x and y variables within the structure are defined as integers. Define them as Single and you should get the result you expect. Otherwise, VB will truncate off your float assignments and convert them to integers.
Text1 isn't leaving out the decimal. Man.x is.
[edited by - Waverider on June 27, 2002 2:45:49 PM]
Text1 isn't leaving out the decimal. Man.x is.
[edited by - Waverider on June 27, 2002 2:45:49 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement