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.
Page Index Toggle Pages: 1
Force '0's? (Read 688 times)
Force '0's?
Oct 28th, 2009, 8:20am
 
I am using a list of numbers from 0000 to 2400, I am using a function to print the digits to screen, but numbers with a zero first are shortened.
How can I make processing show '0123' instead of simply '123', whilst keeping the number an 'int' not a string?

Thanks!
Re: Force '0's?
Reply #1 - Oct 28th, 2009, 8:42am
 
See nf() function.
Re: Force '0's?
Reply #2 - Oct 29th, 2009, 3:19pm
 
Perfect thanks.
Page Index Toggle Pages: 1