MathGroup Archive 2012

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

Search the Archive

Re: Input[] Function Evaluation

  • To: mathgroup at smc.vnet.net
  • Subject: [mg125229] Re: Input[] Function Evaluation
  • From: Szabolcs <szhorvat at gmail.com>
  • Date: Thu, 1 Mar 2012 05:32:21 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <jicth9$elq$1@smc.vnet.net>

On Sunday, 26 February 2012 11:20:41 UTC+2, Don  wrote:
> I would like to use Input[] to prompt the user
> to input a series of separate integers, separated by spaces.
> 
> The Input function wants to multiply the series of integers immediately.  I am trying to capture the series of integers as a list of separate integers.
> How can I do this?
> 
> SetAttributes[Input, HoldAll]  does not work.
> 

You can use InputString[] to get the input as a string, parse it (ToExpression, especially its third argument will be used.  Please see the docs.  Also see StringSplit)

However, I'd suggest using InputField instead which works with Dynamic technology.  To make it read a string, use InputField[x, String].  A similar issue has been discussed here:

http://mathematica.stackexchange.com/questions/1944/how-can-you-stop-ordering-of-inputfield-entries



  • Prev by Date: Re: Line Numbers in Files
  • Next by Date: Re: Line Numbers in Files
  • Previous by thread: Re: Line Numbers in Files
  • Next by thread: Re: Plotting colorfunctions over multiple parametric curves