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 › nf() changes 0.5 to 0,5
Page Index Toggle Pages: 1
nf() changes 0.5 to 0,5 (Read 684 times)
nf() changes 0.5 to 0,5
Jun 12th, 2005, 4:16pm
 
i wanted to save a .obj_file to data. before i changed floats by using nf().
the problem is nf() changes "." to ",".  it's not possible to use the saved file again with OBJLoader. the "," can not be interpreted. by the way saveStrings() puts the file into the sketchfolder. to use it again i need it inside the data.

jan peter
Re: nf() changes 0.5 to 0,5
Reply #1 - Jun 30th, 2005, 12:55am
 
it's not clear what the proper thing to do here would be.. the number format is gonna use the settings of your machine for number separators, so it seems a little presumptuous for us to override those. if you want more control, you can use java's NumberFormat class: http://java.sun.com/j2se/1.4.2/docs/api/java/text/NumberFormat.html
Page Index Toggle Pages: 1