We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › force german system to is decimal point not comma
Page Index Toggle Pages: 1
force german system to is decimal point not comma (Read 175 times)
force german system to is decimal point not comma
Mar 3rd, 2009, 3:07pm
 
hi,
my processing sketches often generate acsii files to be postprocessed by other software to just a kind of a log file.

i use the PrintWriter class and the prinltln method to write theese file. how can i force processing/java to not use the german comma as decimal separator?

eg.:
pWriter.println(100.001); // adds 100,001 not 100.001

any solutions for this general problem?

thanks,
stefan
Re: force german system to is decimal point not co
Reply #1 - Mar 3rd, 2009, 4:39pm
 
Try something like the following in your setup function:

Code:
Locale.setDefault(Locale.US);
Page Index Toggle Pages: 1