Re: What is going on!?!
- To: mathgroup at smc.vnet.net
- Subject: [mg104737] Re: [mg104688] What is going on!?!
- From: Leonid Shifrin <lshifr at gmail.com>
- Date: Sun, 8 Nov 2009 06:47:34 -0500 (EST)
- References: <200911071146.GAA09847@smc.vnet.net>
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[3]:= x = 0; > For[i = 1, i <= 10, i++, > x = x + 1; > ] x > > Out[4]= 10 Null > > >
- References:
- What is going on!?!
- From: Joe Hays <joehays@vt.edu>
- What is going on!?!