tb0012.pp 577 B

123456789101112131415161718192021222324
  1. { Old file: tbs0015.pp }
  2. { tests for wrong allocated register for return result of floating function (allocates int register) OK 0.9.2 }
  3. program test;
  4. type
  5. realgr= array [1..1000] of double;
  6. var
  7. sx :realgr;
  8. i :integer;
  9. stemp :double;
  10. begin
  11. sx[1]:=10;
  12. sx[2]:=-20;
  13. sx[3]:=30;
  14. sx[4]:=-40;
  15. sx[5]:=50;
  16. sx[6]:=-60;
  17. i:=1;
  18. stemp:=1000;
  19. stemp := stemp+abs(sx[i])+abs(sx[i+1])+abs(sx[i+2])+abs(sx[i+3])+
  20. abs(sx[i+4])+abs(sx[i+5]);
  21. writeln(stemp);
  22. if stemp<>1210.0 then halt(1);
  23. end.