vb6 bug with ccur 
Author Message
 vb6 bug with ccur

dim t$
dim s as double

t$="134.94050"
s=ccur(t$)

in vb5 sp3 -> s=134.9405
in vb 6 -> s=13494050

it's a great BUG!!!!!!!

now my applications don't run properly.

Pablo DOminguez



Tue, 06 Mar 2001 03:00:00 GMT  
 vb6 bug with ccur

Quote:
>dim t$
>dim s as double

>t$="134.94050"
>s=ccur(t$)

>in vb5 sp3 -> s=134.9405
>in vb 6 -> s=13494050

>it's a great BUG!!!!!!!

>now my applications don't run properly.

Check the Currency tab of "Regional Settings" in the Control panel.  I
bet the "Decimal Symbol" is not set to a period.

From the Help file:

"...when you use CCur, different decimal separators, different
thousand separators, and various currency options are properly
recognized depending on the locale setting of your computer."

-- Roger

-------------------------------
No list server? Manage interactive mailing lists
on your PC with Arrow! http://www.jadebox.com/arrow/

***** Five-Star Rating from ZNet's Software Library!



Tue, 06 Mar 2001 03:00:00 GMT  
 vb6 bug with ccur
You are doing a double conversion...

string to currency to double

Try to dim s as currency.

Quote:

>dim t$
>dim s as double

>t$="134.94050"
>s=ccur(t$)

>in vb5 sp3 -> s=134.9405
>in vb 6 -> s=13494050

>it's a great BUG!!!!!!!

>now my applications don't run properly.

>Pablo DOminguez




Tue, 06 Mar 2001 03:00:00 GMT  
 vb6 bug with ccur

Quote:

>dim t$
>dim s as double

>t$="134.94050"
>s=ccur(t$)

>in vb5 sp3 -> s=134.9405
>in vb 6 -> s=13494050

I suspect that this is caused by the locale you're set to or perhaps a
typographical error. If I run your code as is, I get the expect result of
134.9405. However, if I change the "." to a "," I get 13494050 like you are
getting.

Frank Carr



Tue, 06 Mar 2001 03:00:00 GMT  
 vb6 bug with ccur

?dim t$
?dim s as double
?
?t$="134.94050"
?s=ccur(t$)
?
?in vb5 sp3 -> s=134.9405
?in vb 6 -> s=13494050
?
?it's a great BUG!!!!!!!

I can't repro your VB 6.0 result so it can't be a bug. Is this
happening on the same machine, or different machines? Are the Regional
Settings in Control Panel somehow affecting your result? Do you have
both VB 5.0 and 6.0 installed on the same machine?

Paul
~~~~



Tue, 06 Mar 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. VB6 BUG in ccur()

2. vb 6 BUG with ccur()

3. VB6 Bug - Clipboard emptied when starting vb6

4. totaling access using CCur function

5. Active Server Pages and the (CCur) Data Type...

6. French Reginal Setting and CCur function

7. Dropping zeros after the decimal using Ccur()

8. Funny CCur episode

9. CCur() problem on Windows XP

10. Type mismatch error with CCur, CInt etc.

11. Specify format for CDate, CCur, etc.?

12. CCur with different decimal separators ?

 

 
Powered by phpBB® Forum Software