Optimise an EA and get the best of the optimised ones. - page 49

 
Georgiy Merts:

By the way, a member from another forum has thought it over and over, and has requested all his 9 regcodes.

I suspect that after some time - he will continue to help on the TC League.

I think his decision will depend on the performance of the councillors.

 
Georgiy Merts:

Alexei, how do I do that for you?

To output to a file - I use strings. And to turn double into string - standard function (DoubleToString()).

If to delimit an element of the list - I could make a special field (either string, or boolean), I write delimiters explicitly in a file, then what am I supposed to do with standard functions?

Unless you force a decimal point to be replaced with a comma before outputting to the file - but are you sure this is the right solution?

Exactly - look for a full stop in the string before outputting it to the file and change it to a comma!

I'm sure most people in the RF will open the file normally in excel this way, and not write dates instead of numbers.

 
Aleksey Vyazmikin:

That's right - look for a full stop in the line before outputting it to the file and change it to a comma!

I'm sure most people in the RF will have the file open normally in excel in this way, rather than writing dates instead of numbers.

So you think I'm not one of the majority? My statistics file opens in excel without any problems, and the decimal point is perceived exactly as a decimal point.

And you, then, think that in place of the decimal point in the decimal separator should be a comma ??? Sounds like you're saying something wrong, Alexei...

But, the problem is small, and personally for you - I will make a special version of the experts, in which I will replace a full stop with a comma.

In a few days - now I'm finalizing some classes of my library.

 
Aleksey Vyazmikin:
45 régcodes.
 
Georgiy Merts:

So you think I am not one of the majority? My statistics file opens in Excel without any problem, and the decimal point is perceived as a decimal point.

And you, then, think that in place of the decimal point in the decimal separator should be a comma ??? Sounds like you're saying something wrong, Alexei...

But, the problem is not big, and personally for you - I will make a special version of experts, in which I will replace a decimal point with a comma.

In a few days - now I'm finalizing some classes of my library.

You do not do it for me, but for the majority - I am not the audience, which must be interested in the project.

I'm talking about the majority based on a sample of people working in the offices of firms, working with numbers from manager to accountant.

 
Aleksey Vyazmikin:

You don't do it for me, but for the majority - I'm not the audience to be interested in the project.

I'm talking about the majority based on a sample of people working in the offices of firms, working with numbers from manager to accountant.

Well so am I about them - and I've never seen a comma used as a decimal point. Worked with accountants quite a lot. True, my information is a decade or more old. Maybe something has changed now ?

Also - I think there would have been threads on the forum long ago that DoubleToString() - should return a comma delimiter. (Although, in a good way, it should return separator, which is prescribed in locale). But I do not remember such topics.

Are you sure that for most people the decimal separator is a comma, not a decimal point ?

 
Georgiy Merts:

Well, that's what I mean - and I've never seen a comma used as a decimal point. Worked with accountants quite a lot. Really, my information is a decade or more old. Maybe something has changed now ?

Also - I think there would have been threads on the forum long ago that DoubleToString() - should return a comma delimiter. (Although, in a good way, it should return separator, which is prescribed in locale). But I don't remember such topics.

Are you sure that for most people, the decimal separator is a comma, not a decimal point ?

I've already written you about my confidence, which comes from my experience, I'm not a guarantor of people's thoughts and habits - I've told you the facts from my experience.

I'll tell you more that the numeric keyboard (the one on the right side of the alphabetic - the total), the Russian layout when you press a dot (Del) gives a comma, and it's a tool that people use when working with numbers.

 
Aleksey Vyazmikin:

I have already written to you about my confidence, which comes from my experience, I am not a guarantor of people's thoughts and habits - said the facts from my experience.

I'll tell you more, that the numeric keyboard (the one on the right side of the alphabetic - common), in the Russian layout when you press a dot (Del) gives a comma, and this is the tool that people use when working with numbers.

Yes, that's right. It's the only key I use for entering numbers.

And I have a symbol on this key - depending on the layout.

When I turn on Russian, I can't put a comma anywhere with this key. I put a decimal point everywhere.

Although, when I switched to English, half of the programs display a comma (although, Excel produces a decimal point in both layouts).

Of course,function DoubleToString() should look at locale and put that delimiter of integer and fractional parts, which is written there. But the fact that this function uses decimal point, tells me that most people assume that the fractional part separator should be a decimal point.

But the problem is farfetched - I will make a comma for you, and this feature will remain in the code. If someone asks for it, he will have it too.

 
Georgiy Merts:

Yes, yes. I only use these keys to enter numbers.

And I have a symbol on this key - it depends on the layout.

When I turn on Russian, I can't put a comma anywhere with this key. I put a decimal point everywhere.

Although, when I switched to English, half of the programs display a comma (although, Excel produces a decimal point in both layouts).

Of course, by the way,function DoubleToString() should look at the locale, and put that delimiter of integer part and fractional part, which is prescribed there. But the fact that this function uses a decimal point, tells me that most people assume that the fractional part separator should be a decimal point.

But the problem is farfetched - I will make a comma for you, and this feature will remain in the code. If someone asks for it, he will have it too.

By the way, the man here had the same problem, and it was just with MThttps://habr.com/post/138957/ . He just said that the point is an English-speaking delimiter, while the comma is closer to Russia.

Anyway, that's how it is, thanks for making commas!

То, что нужно помнить о десятичном разделителе
То, что нужно помнить о десятичном разделителе
  • 2027.02.12
  • habr.com
Все, кто когда-либо писали программы на C#, использовали такую простую функцию как у меня, как и у остальных, до определенного момента никаких проблем с ней не возникало. У этой функции есть такая особенность, которая не всем известна — это то, что разделитель по умолчанию используется тот, который стоит в системе. В англоязычных странах в...
 
Aleksey Vyazmikin:

Anyway, that's it, thank you for making the commas!

Yes, I will.

I'll finish modifying classes (trying to speed things up), and add comma replacements.

In about a week or two.

Reason: