I'm fairly new to Mathematica. Suppose I have the following function:
f[x_Integer] := Module[{y, z, r},
y = 5;
z = 10;
r = x + y + z;
r
];
and I would like to halt the execution after each of the statements y = 5
, z = 10
and r = x + y + z
, and resume only after I press a key. (In other words, I'm looking for something like Console.ReadLine()
in C#
or getline()
in C++
.) Is there an easy way to do this in Mathematica?
Thanks in advance for your help.
Input[]
does the trick. Is the the idiomatic way of implementing the desired outcome? $\endgroup$