/in/foo.c:1:1: error: unknown type name 'var'
var
^~~
/in/foo.c:2:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
a,b,c,d,i,j:longint;
^
/in/foo.c:3:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
x:ansistring;
^
/in/foo.c:4:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
v:boolean;
^
/in/foo.c:5:1: error: unknown type name 'begin'
begin
^~~~~
/in/foo.c:6:1: warning: parameter names (without types) in function declaration
readln(x);
^~~~~~
/in/foo.c:7:1: warning: data definition has no type or storage class
readln(a);
^~~~~~
/in/foo.c:7:1: warning: type defaults to 'int' in declaration of 'readln' [-Wimplicit-int]
/in/foo.c:7:1: warning: parameter names (without types) in function declaration
/in/foo.c:8:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
x:=x+' ';
^
/in/foo.c:9:1: error: expected identifier or '(' before 'if'
if a=length(x) then begin write('0');
^~
/in/foo.c:10:1: warning: data definition has no type or storage class
halt;
^~~~
/in/foo.c:10:1: warning: type defaults to 'int' in declaration of 'halt' [-Wimplicit-int]
/in/foo.c:11:1: warning: data definition has no type or storage class
end;
^~~
/in/foo.c:11:1: warning: type defaults to 'int' in declaration of 'end' [-Wimplicit-int]
/in/foo.c:12:1: error: unknown type name 'repeat'
repeat
^~~~~~
/in/foo.c:13:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
j:=j+1;
^
/in/foo.c:14:1: error: expected identifier or '(' before 'for'
for i:=1 to length(x)-1 do
^~~
/in/foo.c:16:1: error: expected identifier or '(' before 'break'
break;
^~~~~
/in/foo.c:17:1: warning: data definition has no type or storage class
end;
^~~
/in/foo.c:17:1: warning: type defaults to 'int' in declaration of 'end' [-Wimplicit-int]
/in/foo.c:18:1: error: unknown type name 'until'
until j=a;
^~~~~
/in/foo.c:18:9: error: initializer element is not constant
until j=a;
^
/in/foo.c:19:1: error: expected identifier or '(' before 'while'
while (x[1]='0') and (length(x)<>1) do
^~~~~
/in/foo.c:21:1: error: expected identifier or '(' before 'if'
if length(x)=1 then write('0') else write(x);
^~
/in/foo.c:22:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
end.
^