在Isabelle / HOL中,我可以用Console.Write("Row (1-3): ");
int UserRowChoice = Convert.ToInt32(Console.ReadLine());
try { }
catch (InvalidCastException e) { ThrowError("You typed a string instead of an integer. You've lost your turn."); Console.ReadKey(); RunGame(T1, CurrentPlayer, Winner); }
if (UserRowChoice < 1 || UserRowChoice > 3)
{
ThrowError("You either typed a number that was less than 1 or greater than 3. You've lost your turn.");
Console.ReadKey();
RunGame(T1, CurrentPlayer, Winner);
}
表示任意类型的任意(但固定)值。对此有更简洁的表示法吗?
答案 0 :(得分:3)
undefined
(我希望我能写上面的内容,但答案必须超过9个字符。)