FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Bugs
   Bug Fixes, Implemented Suggestions
(Moderator: fry)
   nf() reference
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: nf() reference  (Read 258 times)
desdesign


nf() reference
« on: May 7th, 2003, 1:24am »

hey casey,
 
i'm trying to resolve my first real stab at a processing program (for which i may post a question elsewhere in the forum if i can't figure it out myself) and in the process, stumbled across a few errors on the following page:
http://proce55ing.net/reference/nf_.html
 
the original bug report was moved to bug fixes yesterday but it still appears incorrect - perhaps the page is cached and therefore appears to not have been corrected, but in case this is not the reason, thought i'd let you know.
 
keep up the great work.
 
example currently reads:
 
int sa=200, sb=40, sc=90;
String sa = nf(a, 10);
println(sa); // prints "0000000200"
String sb = nf(b, 5);
println(sb); // prints "00040"
String sc = nf(c, 3);
println(sc); // prints "090"
 
float d = 200.94, e = 40.2, f = 9.012;
String sd = nf(a, 10, 4);
println(sd);  // prints "0000000200.9400"
String se = nf(b, 5, 3);
println(se);  // prints "00040.200"
String sf = nf(c, 3, 5);
println(sf);  // prints "090.01200"
 
example should read:
 
int a=200, b=40, c=90;
String sa = nf(a, 10);
println(sa); // prints "0000000200"
String sb = nf(b, 5);
println(sb); // prints "00040"
String sc = nf(c, 3);
println(sc); // prints "090"
 
float d = 200.94, e = 40.2, f = 9.012;
String sd = nf(d, 10, 4);
println(sd);  // prints "0000000200.9400"
String se = nf(e, 5, 3);
println(se);  // prints "00040.200"
String sf = nf(f, 3, 5);
println(sf);  // prints "090.01200"
 
REAS

WWW
Re: nf() reference
« Reply #1 on: May 7th, 2003, 11:56am »

Very sorry. You are totally correct. I posted the update too quickly and made another mistake. I'll make sure to compile all code in the future. It should be correct now.
 
+ Casey
 
Pages: 1 

« Previous topic | Next topic »