# Why does Table behave differently in Mathematica compared to WolframCloud?

In Stephen Wolfram's elementary introduction to the wolfram language it says you can use the table function like this: Table[5, 10], to create a table of the element 5 repeated 10 times. This works in WolframCloud but not in Mathematica, at least not Mathematica on the Raspberry Pi which is the version I use because it's free. Is there a way I can make the Table function in Mathematica behave the same as in WolframCloud? At the moment it's throwing me an error saying Table::itform : Argument 10 at position 2 does not have the correct for for an iterator.

Here's Wolfram's introduction: http://wolfram.com/language/elementary-introduction/06-making-tables.html

• The command Table[5,10] works for me in Mathematica 10.3.1. – M.R. Jan 7 '16 at 3:36

Recently this issue has been discovered for several times in this site, because a new syntax of Table

Table[expr, n]


is added silently in v10.3 and the corresponding old syntax

Table[expr, {imax}]


is no longer mentioned in the document. (Yeah it still works! ) Just compare the first usage information of Table in v10.3 and v10.2 yourself.

Maybe this should be considered as a bug of the document.

As mentioned by george2079 in the comment, the same thing has also happened on Do, in v10.2.

You may want to check the document of Do in v10.2 and v10.1.

Not sure if there're more. BTW, this does not happen on ParallelTable and ParallelDo.

Update

The syntax change of Table and Do has now been documented in v10.4.

• In my version (V10.0.1 on OS X 10.10.5), Table[expr, 10] ("Argument 10 does not have the correct form for an iterator.") Perhaps this was introduced in 10.1, 2 or 3? – march Jan 7 '16 at 4:29
• @march You're right, according to the legacy document, it's actually added in v10.3. Thanks for pointing out, edited. – xzczd Jan 7 '16 at 5:09
• oh my think of how much code will break if they drop the old syntax. I see the same change for Do by the way. Anywhere else? – george2079 Jan 7 '16 at 14:49
• @george2079 And this actually happens in v10.2. So this syntax of Do isn't as popular as that of Table 囧. – xzczd Jan 8 '16 at 3:48