/in/foo.c:1:1: error: unknown type name 'program'
program ex;
^~~~~~~
/in/foo.c:2:1: error: unknown type name 'var'
var n,x,i,s:integer;
^~~
/in/foo.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
var n,x,i,s:integer;
^
/in/foo.c:3:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
a:array[1..1000]of integer;
^
/in/foo.c:3:13: error: too many decimal points in number
a:array[1..1000]of integer;
^~~~~~~
/in/foo.c:5:1: error: unknown type name 'begin'
begin
^~~~~
/in/foo.c:6:5: warning: parameter names (without types) in function declaration
readln(n);
^~~~~~
/in/foo.c:7:5: error: expected identifier or '(' before 'for'
for i:=1 to 1000 do
^~~
/in/foo.c:9:5: error: expected identifier or '(' before 'for'
for i:=1 to n do
^~~
/in/foo.c:12:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
a[x]:=1;
^
/in/foo.c:13:6: warning: data definition has no type or storage class
end;
^~~
/in/foo.c:13:6: warning: type defaults to 'int' in declaration of 'end' [-Wimplicit-int]
/in/foo.c:14:6: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
s:=0;
^
/in/foo.c:15:5: error: expected identifier or '(' before 'for'
for i:=1 to 1000 do
^~~
/in/foo.c:17:5: warning: data definition has no type or storage class
writeln(s);
^~~~~~~
/in/foo.c:17:5: warning: type defaults to 'int' in declaration of 'writeln' [-Wimplicit-int]
/in/foo.c:17:5: warning: parameter names (without types) in function declaration
/in/foo.c:18:5: error: expected identifier or '(' before 'for'
for i:=1 to 1000 do
^~~
/in/foo.c:20:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
end.
^