regional configuration

I have a problem with the locale.
As you can be established by regional coonfiguracion xojo al. as decimal separator and, for thousands and when I leave the system back to decimal and. for thousands?

The international settings on the system control panel are what Xojo uses.
So, you Xojo application will show what the user sets in the system preferences.

I had this trouble recently: a nasty bug .

In general:
If a user can see values, use CStr(dbl) to display them.

if you read user amended values back to use them in your app, convert them to a decimal using Cdbl()

so 3.14159 will display as “3,14159” on a French machine.
Val(“3,14159”) gives you 3
Cdbl(“3,14159”) gives you 3.14159 on a French machine, and 3 on a US machine

===============================

To STORE the values as a string, use Str(dbl) because this always uses . as the separator
and to turn a string value from storage back into a double, use Val(string)

so 3.14159 will convert into “3.14159” for storage
Str(cdbl(“3,14159”) ) will become “3.14159”
Val(“3.14159”) gives you 3.14159 no matter what locale you are using.

Note: The new framework has a different syntax for Val, which would generate an error if the string includes invalid characters

The basics here are Xojo functions will always work using the dot (.) for decimal separation.
So every transformation is done in code can simply use Val(). If the value is shown to the user, it must be formatted using Format() or Str(). However if a value entered by user must be converted to a double, Cdbl() must used to interpret the local format.
This means not Cdbl() works in any case:
in a system with US settings (dot for decimal, comma for thousand), doing something like Cdbl(3,14159) will give back a 3.0 double.