0
我的代碼在下面引發異常。爲什麼?在pascal程序中非法表達
program Masquerade(input, output);
Begin
var amount, count, money : integer;
writeln ('Welcome to the Wonder True Masquerade Band');
writeln ('Would you like to proceed? Yes/No');
var choice : String;
readln (choice);
End.
拋出錯誤:fatal: syntax error ";" expected but "identifier AMOUNT" found
應該在哪裏分號去了?
沒錯。您不能在pascal中的代碼塊內聲明變量。 – CodesInChaos 2011-01-27 19:50:51