[Gambas-user] Upd 3.15.2 with Xub16.04: Replacing Val() by CFloat(), [Solved]

ub2 at gmx.ch ub2 at gmx.ch
Sun Sep 27 19:09:35 CEST 2020


Hi Cedron, Lee and Jussi


Thanks a lot for your answers and sorry for my late response.
Since I did no receive none of my own emails through the list, I
believed that the list was not working at all.
I therefore planned to ask and check next week again.
But obviously you got it (but not me!), so sorry for that.


Now answering your questions:

@ Cedron:
Your code:					=> Output

Print "*"; Val("15911.23046875"); "***"		=> ****

Dim x As Float = Val("15911.23046875")		=> Fails, same error
Print x

Dim y As Float = CFloat("15911.23046875")
Print y						=> 15911,23046875

Print "*"; Val("15911.23046875"); "*\t*\t*"   	=> **    *    *


@ Lee:
Thanks for your explanation why \t is not working in messages.


@ Jussi
Do Val("15911,23046875") work (IE instead of "." use ",")?

Yes it does! Seems that with 3.15.2 something changed in reading
the localization in Xubuntu16.04LTS. But not in Xub18.04. Strange!


=> Workaround:
However, replacing Val() by CFloat() in all my code seems to solve the
issue. I'll do either that in the next days, or skip Xub16.04 support.


Again, thanks a lot for your help.

ub2


PS: Monday I'm out off office.
(so, in case you have comments, risk of late response again ... ;-))


More information about the User mailing list