Program Blue;
var a : string;
l,p : shortint;
x : char;
begin
readln(a);
l:=length(a);
x:=s[1];p:=1; for l:=2 to l do if x<s[l] then begin p:=l;
x:=s[l];
end;
writeln('Maxim element is',x,' and position is',p);
end.
What's wrong here?