Timeline for What are the most common pitfalls awaiting new users?
Current License: CC BY-SA 3.0
26 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 16, 2020 at 9:23 | history | edited | CommunityBot |
Commonmark migration
|
|
Aug 21, 2017 at 8:44 | history | edited | numbermaniac | CC BY-SA 3.0 |
comments noted that this should be infix, not binary
|
Jan 22, 2017 at 0:05 | history | edited | m_goldberg | CC BY-SA 3.0 |
Removed update that should be a different answer.
|
Jan 20, 2017 at 4:51 | history | edited | Felix | CC BY-SA 3.0 |
Explained the issue of missing ; in functions
|
Jan 12, 2017 at 21:52 | comment | added | Felix |
I agree with Yves that the most common pitfall regarding the semicolon, at least for me, is omitting it in modules like here: Module[{a, b}, a = 1 b = 2 Print[{a, b}] ]; The same code would work fine if not wrapped in a Module. Shall we include this here or in a separate answer?
|
|
Dec 3, 2015 at 0:04 | comment | added | m_goldberg | @Tdonut. if so, all you have to do is omit the semi-colon. A terminating semi-colon is entirely optional. | |
Dec 2, 2015 at 21:16 | comment | added | Tdonut | I care about the details! | |
Nov 17, 2015 at 5:54 | comment | added | Dr. belisarius | @Rojolalalalalalalalalalalalala Love your new Palito-Ortega-inspired name | |
Nov 11, 2015 at 1:56 | comment | added | Sampo Smolander | "Wolfram Research chose semicolon for the binary operator form of CompoundExpression to make Mathematica code look more like C code" Also at least OCaml and Scala use semicolon is to compound expressions, just like in Mathematica. | |
Sep 22, 2015 at 9:09 | comment | added | Sepideh Abadpour |
well then what symbol is used as expression terminators in Mathematica? It seemed to me that we add ; at the end of the expression to prevent its result being printed just as MATLAB?
|
|
Apr 28, 2015 at 18:06 | history | bounty ended | ciao | ||
Jan 22, 2014 at 19:32 | comment | added | Ralph Dratman | I disagree with m_goldberg about avoiding "replacements for general documentation." Each of the many gaps in Mathematica's documentation leads directly to a pitfall. In that situation, a gap filled is a pitfall avoided. | |
Oct 9, 2013 at 18:20 | history | edited | m_goldberg | CC BY-SA 3.0 |
added 3 characters in body
|
Oct 9, 2013 at 16:21 | comment | added | Rojo |
Perhaps as part of this answer it may be added the typical "times by Null" mistake. For example Module[{result}, For[... , in the loop result is assigned, and then, without a semicolon after closing For , on the next line, result .
|
|
Jan 31, 2013 at 9:20 | history | edited | m_goldberg | CC BY-SA 3.0 |
Added a section discussing semicolon at the end of an expression
|
Jan 29, 2013 at 21:03 | comment | added | rcollyer |
It should be noted that ; has a lower precedence than almost everything, including both Set and SetDelayed . So, to use them in conjunction with each other, parentheses or a scoping construct needs to be used.
|
|
Jan 28, 2013 at 20:20 | history | edited | m_goldberg | CC BY-SA 3.0 |
deleted 20 characters in body
|
Jan 28, 2013 at 15:39 | comment | added | halirutan |
Shouldn't binary form be infix form? In fact, CompoundExpression is in general not a binary operation!
|
|
Jan 28, 2013 at 15:01 | comment | added | Yves Klett | Aww shucks, the curse of commenting on CW (CoCoCW) ;-) | |
Jan 28, 2013 at 14:54 | comment | added | m_goldberg | @YvesKlett. Yes, that's true. Why don't you write that up as another pitfall? Or edit this contribution to include your point? (After all, it's a CW) | |
Jan 28, 2013 at 14:35 | history | edited | m_goldberg | CC BY-SA 3.0 |
Added missing word
|
Jan 28, 2013 at 14:29 | comment | added | Yves Klett |
But a common pitfall is not to suppress output or improper use of , vs. ; in Module etc.
|
|
Jan 28, 2013 at 14:27 | comment | added | m_goldberg | @YvesKlett. I think posts to this CW are meant to be restricted to pitfalls and not meant to be replacements for general documentation. | |
Jan 28, 2013 at 14:22 | comment | added | Yves Klett |
perhaps a bit more on the actual effect of ; ?
|
|
S Jan 28, 2013 at 14:15 | history | answered | m_goldberg | CC BY-SA 3.0 | |
S Jan 28, 2013 at 14:15 | history | made wiki | Post Made Community Wiki by m_goldberg |