Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: CAST currency to char/varchar
Message
From
15/06/2004 10:25:51
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Title:
BUG: CAST currency to char/varchar
Miscellaneous
Thread ID:
00913871
Message ID:
00913871
Views:
47
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
Next
Reply
Map
View

Click here to load this message in the networking platform