MathGroup Archive 2011

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

Search the Archive

Re: Can't make Input[] work the way I want it to.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg120524] Re: Can't make Input[] work the way I want it to.
  • From: Simon <simonjtyler at gmail.com>
  • Date: Wed, 27 Jul 2011 06:13:35 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Reply-to: comp.soft-sys.math.mathematica at googlegroups.com

Put brackets {} around the input.

1,2,3 is not a good Mathematica expression, so Input can only return the Box expression. You could do some simple syntax checking to find when an expression like "1,2,3" (x=RowBox[{"1", ",", "2", ",", "3"}]) has been entered and then fix it using, e.g., ToExpression@RowBox[{"{", x, "}"}]

Or you could prompt for the correct form using something like
x = Input["Input a list", {Placeholder[Subscript["e", 1]], Placeholder[Subscript["e", 2]], Placeholder[\[Ellipsis]]}]




  • Prev by Date: File directory
  • Next by Date: SystemDialogInput["RecordSound"] automatisation
  • Previous by thread: Can't make Input[] work the way I want it to.
  • Next by thread: Re: Preventing In-line Math Typesetting From Being Scaled Down in Text