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

  • Context: Mathematica 
  • Thread starter Thread starter Ascendant0
  • Start date Start date
  • Tags Tags
    Input Line Multiple
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 4K views
Ascendant0
Messages
179
Reaction score
37
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
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.
 
Reply
  • Like
Likes   Reactions: Ascendant0
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.