Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1997
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1997

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Compiled Functions and Mathgroup Archive

  • To: mathgroup at smc.vnet.net
  • Subject: [mg8912] Re: Compiled Functions and Mathgroup Archive
  • From: sergio at scisun.sci.ccny.cuny.edu (Sergio Rojas)
  • Date: Thu, 2 Oct 1997 22:57:06 -0400
  • Organization: City College Of New York - Science
  • Sender: owner-wri-mathgroup at wolfram.com

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


  • Prev by Date: Re: Piecewise functions
  • Next by Date: Fwd: FindRoot
  • Previous by thread: Re: Subscripts??
  • Next by thread: Re: Compiled Functions and Mathgroup Archive