Saturday, April 02, 2005

VB6 bug of the day: csng() function problems in different regions.

On english windows, csng("1.1") returns 1.1.
On french-windows, csng("1.1"), fails with "Type Mismatch"
On french-windows, csng("1,1", returns 1.1

So, when reading numbers from a data file created in US, you must do something like this in France:
csng( val( strFromDataFile))

No comments: