tspace.pp 301 B

1234567891011121314151617181920
  1. { %opt=-O2 }
  2. function space (b : byte): shortstring;
  3. begin
  4. space[0] := chr(b);
  5. FillChar (Space[1],b,' ');
  6. end;
  7. var
  8. s: string;
  9. i: longint;
  10. begin
  11. fillchar(s,sizeof(s),255);
  12. s:=space(255);
  13. if length(s)<>255 then
  14. halt(1);
  15. for i:=1 to 255 do
  16. if s[i]<>' ' then
  17. halt(2);
  18. end.