>>778
「begin~end」やってるからこそ「endが多い」って言われるんだが・・

if (x[i] < x[i+1]) then begin
 if ((sx<x[i]) or (sx>x[i+1])) then continue ;
end else begin
 if ((sx>x[i]) or (sx<x[i+1])) then continue ;
end;
end;