PASCAL的读入优化

没readkey的情况

type Tstring=record
    s:array[0..maxn] of char;
    n:longint;
  end;


procedure scan(var S:Tstring);
begin
S.n:=0; while not seekeoln do with S do begin
    inc(n); read(s[n]);
end; readln;
end;

posted @ 2014-11-02 17:41  Kiss our dream  阅读(449)  评论(0编辑  收藏  举报