In article <60s3g0$6oi at smc.vnet.net> you wrote:
: Hi Mathgroup
: How can I have MMA print something like:
: The gridsize is arsize
: but replace arsize with the contents of the variable arsize
arsize = 10;
Print["The gridsize is ", arsize];
: -
: I print a bunch of parameters for the current 'run', and would like to
: prompt myself "If this is OK, press enter to continue but if it's not OK,
: press any other key to end the program".
: How can I do this?
Here is a rudimentary approach :
Print["The gridsize is ", arsize];
Print["Type 1 to change arsize"];
Print["Type 2 to cahnge SomethingElse"];
Print["Other input keep current values"];
ans =Input["your choice is "];
Which[ ans == 1,
arsize = Input["Enter new value for arsize"],
ans == 2,
SomethingElse = Input["Enter SomethingElse"],
True,
Print["Let's continue using arsize =", arsize]
];
While, if, Switch are also available.
Rojas
E-mail: sergio at scisun.sci.ccny.cuny.edu