Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug when assigning non-integers to Top,Left,Height and W
Message
From
03/12/2003 11:45:19
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00855459
Message ID:
00855481
Views:
18
>When assigning values to Top, Left, Height and Width properties, be careful not to use numbers with a decimal point: no error is raised, but the value of these properties changes....
>
>x=CREATEOBJECT("line")
>x.Top = 180
>?x.Top && shows 180
>x.Top = 180.00
>?x.Top && shows 2880
>
>I have tested this bug under VFP 7 and 8

vfp6 sp5 gives the error as well

in fact, once you use decimals, it multiplies the value by 16
x=CREATEOBJECT("line")
x.top = 10
?x.top && 10
x.top = 10.0
?x.top && 160
x.top = 180.0
?x.Top, 180*16

x.Top = 180.1
?x.Top, int(180.1*16)
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform