MathGroup Archive 2011

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

Search the Archive

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


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