Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BUG: CAST currency to char/varchar
Message
De
15/06/2004 10:25:51
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro Beta
Titre:
BUG: CAST currency to char/varchar
Divers
Thread ID:
00913871
Message ID:
00913871
Vues:
48
Sended to VFPT.

Observed Behavior
When CAST Y to C for positive values the string is cut,

for a negative value the casting fail.

Expecteded Behavior

For a currency i want no loss data or NULL, and support of negative values
clear
y=$4.1234

? CAST(m.y AS C(4))	,"Expected .NULL."  at 20
? CAST(m.y AS C(9))
? CAST(m.y AS C(20))

y=$123412345
? CAST(m.y AS C(4))	,"Expected .NULL."  at 20
? CAST(m.y AS C(10))	,"Expected 123412345  or Expected .NULL."  at 20
? CAST(m.y AS C(20))

y=$1234.1234
? CAST(m.y AS C(4))	,"Expected .NULL."  at 20
? CAST(m.y AS C(10))
? CAST(m.y AS C(20))

y=-$1234.1234
? CAST(m.y AS C(4))	,"Expected .NULL."  at 20
? CAST(m.y AS C(9))	,"Expected .NULL."	at 20
? CAST(m.y AS C(20))	,"Expected |-1234.1234          |" at 20
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform