Mathematica - How to Go to Next Line Without Running Process?

  • #1
Ascendant0
53
11
I am trying to run multiple lines input in Mathematica in the free-form input. From everything I read online, you simply hit "enter", but hitting enter runs my process. Both enters, the one next to my letters, and the one on the numerical keypad. Hitting shift+enter also runs it. I can't find anything explaining why this is happening. I would imagine it's some kind of setting I need to change in Mathematica, but I looked through settings and couldn't find one that would be applicable. Help please?
 
Physics news on Phys.org
  • #2
See https://reference.wolfram.com/language/tutorial/InputSyntax.html#14153:

If at the end of a particular line the input you have given so far corresponds to a complete expression, then the Wolfram Language will normally begin immediately to process that expression.

You can however explicitly tell the Wolfram Language that a particular expression is incomplete by putting a ∖ or a  (\[Continuation]) at the end of the line. The Wolfram Language will then include the next line in the same expression, discarding any spaces or tabs that occur at the beginning of that line.
 
  • Like
Likes Ascendant0
  • #3
pasmith said:
Thank you for the information. I can't look at the entire link while working, but I'll be able to later this evening.

I did have a minute to try using the "\" at the end of a line, and it is still processing it as soon as I hit enter. Is that \ maybe only applicable for "Mathematica Input" and not "Free-form input"? I still need to learn the Mathematica language, so I'm using the free form for now. I absolutely plan to learn the language before the end of this year, I just can't at this time.
 

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
988
  • MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • Electromagnetism
Replies
3
Views
1K
  • Programming and Computer Science
Replies
0
Views
518
  • Programming and Computer Science
Replies
2
Views
876
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
6K
  • Programming and Computer Science
Replies
22
Views
922
  • Programming and Computer Science
Replies
4
Views
340
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
13K
Back
Top