[Date Index] [Thread Index] [Author Index]
Re: What is going on!?!
Joe, The For loop does not produce any result, that is - it produces Null. The space is understood as a multiplication operator by the Mathematica parser. Thus your result. Put a semicolon after the closing bracket of the For loop and you will get what you expect. Regards, Leonid On Sat, Nov 7, 2009 at 3:46 AM, Joe Hays <joehays at vt.edu> wrote: > Can anyone tell me why the output is not a simple "10" instead of "10 > Null"? > > In:= x = 0; > For[i = 1, i <= 10, i++, > x = x + 1; > ] x > > Out= 10 Null > > >