Reputation: 1
My code below throws an exception. Why?
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.
Throws the error: fatal: syntax error ";" expected but "identifier AMOUNT" found
Where should the semi-colon go?
Upvotes: 0
Views: 3825
Reputation: 5980
Put begin
after var
.
I haven't used Pascal for years and don't have any compiler to test it, but it should be like this:
program Masquerade(input, output);
var
amount, count, money : integer;
begin
writeln ('Welcome to the Wonder True Masquerade Band');
...
Upvotes: 5