Am 14.05.2013 02:58, schrieb Willy Raets: > Hello, > > I have following problem in a project: > > When Regional settings are English US of UK this works fine > When Regional settings are a European mainland country this results in: > > Error 6: Type mismatch: wanted Float, got Null instead > > Seems that Val() doesn't take regional settings into account > When a text contains 5,5 (with a comma) Val() returns Null > When a text contains 5.5 (with a dot) Val() returns 5.5 >
Hi Willy, I know it, and I used to think this was standard behaviour. Every number notation which is beyond English US results in Null. I am in Germany with commas for decimals... So for a long time I have been replacing 5,5 by 5.5 before calling val(), even in other interpreters than Gambas. Are you sure it is really defined as to look for the locale? And with Gambas I always have it checked for Null before daring to let val() look into the string. In practice, it would be way easier to have val() simply return Zero on all non-valid actions, like it's done in other interpreters. Just my 2 cents about it... Regards Rolf ------------------------------------------------------------------------------ AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d _______________________________________________ Gambas-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
