I have this code http://ideone.com/aAhXE8
but in cf (custom test) it has different output http://s16.postimg.org/hug6l6y4l/bug.jpg
why is the newline character still entering the loop ?
in my computer the output is like the one in ideone, is it a bug in CF ?
edit : answered, CF is using : ~~~~~ "\r\n" ~~~~~
I think, it's better to write like this
while ((c = (char)br.read()) && c >= '0' && c <= '9')
(Sorry for my poor english)maybe you meant while ( (c=(char)br.read())>='0' && c <='9)
because (c = (char)br.read()) isn't a condition, but, now i know that for new line, CF use "\r\n"
You can fix it if you add
&& c != '\r'
into if condition. It happend because of difference between newline representation by Linux and Windows. http://en.wikipedia.org/wiki/Newline#Representationsthx, i didn't know that