RosettaCodeData/Task/Menu/Mathematica/menu.math
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

4 lines
193 B
Text

textMenu[data_List] := (MapIndexed[Print[#2[[1]], ") ", #] &, {a, b, c}];
While[! (IntegerQ[choice] && Length[data] > choice > 0),
choice = Input["Enter selection"]];
data[[choice]])