Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bug when assigning non-integers to Top,Left,Height and W
Message
De
03/12/2003 11:45:19
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00855459
Message ID:
00855481
Vues:
17
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform