Re: Comma's in numbers.
Posted: Mon Sep 16, 2013 5:34 pm
Digit group mark must be acquired from system settings. Think, PB team doesn't wish to implement this because this is real headache.
http://www.purebasic.com
https://www.purebasic.fr/english/
No, certainly not.Korolev Michael wrote:Digit group mark must be acquired from system settings.
I certainly do not want to write e.g.Danilo wrote:Nice idea, if you want to use comma ',' as thousands separator (english notation).freak wrote:Just use a macro:Code: Select all
Macro Num(a=,b=,c=,d=,e=,f=) a#b#c#d#e#f EndMacro Debug Num(1,000) Debug Num(1,000,000)
Code: Select all
x = Num(53,214,589) * Num(45,212,547)
Since in programming languages (as well as with command-line arguments etc.) spaces mostly are used as separators, it's an old and well established practice to use the underscore '_'. where no separator is intended, but where it shall look almost like a space. Underscores can already be part of identifiers in PB, so why couldn't they be part of numbers?Wikipedia (see link above) wrote:Other style-defining bodies are also moving toward this clearer notation. For example, the International Union of Pure and Applied Chemistry (IUPAC) suggest never using a comma or a point as thousands separator: "For numbers with many digits, the digits may be separated in groups of three, counting from the decimal sign toward the left and the right. The groups should be separated by a thin space (half space), and never by a comma or a point, or by any other means."[14] The American Medical Association, whose AMA Manual of Style is widely followed in health professions literature, also endorses a space for the digit group separator.[11] (Specifically, a thin space is endorsed for typesetting; a regular word space is sufficient wherever typographical nicety is impractical.) The United Kingdom Metrication Board also proposed this system for Metrication in the United Kingdom and, while not universally adopted, it is the standard in the UK construction industry.