Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ComTools - OR()
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Titre:
Divers
Thread ID:
00577283
Message ID:
00590336
Vues:
27
Chris: Just found your message.

FP2.x does funny things with arrays. Try moving the value out of the array into an
int.

>? OR(a_tmp[3], 0)

x = INT(a_tmp[3])

OR(x, ...

Regards.
>Is this a bug?
>
>It errors saying that I have passed a Floating Point as the first parameter.
>Yet It is clearly not a floating point.
>Is this a problem with ComTools failing to determine the data type correctly, or is FoxPro setting is wrong?
>Wrapping it in an INT() like the error message suggests does work, but I fail to understand why it fails in the first place.
>
>Any Ideas?
>(Added Note: Also does the same under VFP 6 and 7 using CVF50.fll)
>
>
>SET LIBRARY TO CTFW
>PRIVATE a_tmp
>DIMENSION a_tmp[3]
>a_tmp[1]= 0.00
>a_tmp[2]= ""
>a_tmp[3]= 0
>
>CREATE CURSOR Temp (n1 N(5,2), c1 C(5), n2 N(1))
>INSERT INTO Temp VALUES (1.00, "Test", 3)
>
>SELECT n1, c1, n2;
> FROM Temp ;
> INTO ARRAY a_tmp
>
>?a_tmp[1]
>?a_tmp[2]
>?a_tmp[3]
>? OR(a_tmp[3], 0)
---------------------------------------
Magna Carta Software, Inc.
WEB: www.magnacartasoftware.com
Support: support@magnacartasoftware.com
Sales: sales@magnacartasoftware.com
FAX: +1 (972) 377-9074
7000 Independence Pkwy., Ste. 160-227
Plano, TX 75025, USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform