[go: up one dir, main page]

|
|
Log in / Subscribe / Register

Decimals used by some of my European colleagues

Decimals used by some of my European colleagues

Posted Jun 8, 2013 14:07 UTC (Sat) by jhhaller (guest, #56103)
Parent article: Little things that matter in language design

Some of my European colleagues transpose the usage of comma and period from what I grew up with in the US, such that three thousand and four hundredths would be represented as 3.000,04. So far, I have not seen this convention baked into a programming language, although it's frequently available for formatting based on the local language settings. It's a bad idea for a program to compile code differently based on what the local language settings at compile time, but is there any common convention for specifying a comma as the decimal point in the code?


to post comments

Decimals used by some of my European colleagues

Posted Jun 8, 2013 14:27 UTC (Sat) by hummassa (guest, #307) [Link]

COBOL had

ENVIRONMENT DIVISION.
DECIMAL-POINT IS COMMA.

:-D

Decimals used by some of my European colleagues

Posted Jun 13, 2013 5:17 UTC (Thu) by tnoo (subscriber, #20427) [Link] (1 responses)

> So far, I have not seen this convention baked into a programming language, although it's frequently available for formatting based on the local language settings.

Microsoft Excel excels at that. Which is a complete nightmare, opening a german spreadsheet in an english version of Excel.

Decimals used by some of my European colleagues

Posted Jun 13, 2013 10:53 UTC (Thu) by storner (subscriber, #119) [Link]

Amen. It also means that a "comma separated values" file (.csv in Excel) is actually a "semi-colon separated values" file if you export it from some non-US versions. Great fun when exchanging stuff between different locales.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds