Comma's in numbers.
-
- Enthusiast
- Posts: 200
- Joined: Wed Feb 01, 2012 5:30 pm
- Location: Russian Federation
Re: Comma's in numbers.
Digit group mark must be acquired from system settings. Think, PB team doesn't wish to implement this because this is real headache.
Former user of pirated PB.
Now registered user :].
Now registered user :].
-
- Addict
- Posts: 4779
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: Comma's in numbers.
No, certainly not.Korolev Michael wrote:Digit group mark must be acquired from system settings.
PB code must be exactly the same for all PB users in all countries.
Re: Comma's in numbers.
Ha! I never knew Macro x(a=,b=) was valid 
Since calling it does not allow empty parameters...
x(,2) fails.

Since calling it does not allow empty parameters...
x(,2) fails.

The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
-
- Enthusiast
- Posts: 200
- Joined: Wed Feb 01, 2012 5:30 pm
- Location: Russian Federation
Re: Comma's in numbers.
Are we regarding comma as a part of code? Or as additional info tip?
Former user of pirated PB.
Now registered user :].
Now registered user :].
-
- Addict
- Posts: 4779
- Joined: Thu Jun 07, 2007 3:25 pm
- Location: Berlin, Germany
Re: Comma's in numbers.
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)
For those reasons, the space is recommended as digit group separator in the SI/ISO 31-0 standard.
And
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.

-
- Addict
- Posts: 1264
- Joined: Wed Feb 28, 2007 9:13 am
- Location: London
Re: Comma's in numbers.
I just want to point out that, in the thread title, "comma's" should not have an apostrophe. The plural of "comma" is "commas".
JACK WEBB: "Coding in C is like sculpting a statue using only sandpaper. You can do it, but the result wouldn't be any better. So why bother? Just use the right tools and get the job done."