Re: What is going on!?!
- To: mathgroup at smc.vnet.net
- Subject: [mg104733] Re: What is going on!?!
- From: David Bailey <dave at removedbailey.co.uk>
- Date: Sun, 8 Nov 2009 06:46:44 -0500 (EST)
- References: <email@example.com>
Joe Hays 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 > > Your For function returns Null, and this is getting multiplied by x because you forgot the semicolon after the ] . David Bailey http://www.dbaileyconsultancy.co.uk