Posted: Tue Nov 19, 2002 5:42 am Post subject: Error when casting float to decimal with WMQI 2.1 CSD3
Novice
Joined: 04 Apr 2002 Posts: 23
I have experienced an error when casting a float to a decimal with Windows Regional settings = French.
The CAST function returns the following error:
"A attempt was made to translate the string 1,00005E+4 into a decimal value, but the string did not comply with the expected format. The string must comply to format: [sign]figure[.figure], where sign can be '+' or '-', and figures can be one or several decimal figures. The string must not be empty nor include more than 31 figures."
This error does not occur when Windows Regional settings = US English.
My impressions are:
1) Although the variable is declared as float in the MRM message definition, internally WMQI seems to store it as a string.
2) When storing the float in a string, if Windows Regional settings = French, WMQI uses a coma for the decimal point separator (this is the French convention).
3) But when WMQI executes the CAST function, WMQI does not remember that it used a coma instead of a dot and diagnose a syntax error.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum