bug0243.pp 469 B

12345678910111213141516171819202122232425
  1. program simpletest;
  2. var i : longint;
  3. function _next : longint;
  4. begin
  5. inc(i);
  6. _next:=i;
  7. end;
  8. procedure test(a,b : longint);
  9. begin
  10. Writeln('first arg is ',a);
  11. Writeln('second arg is ',b);
  12. end;
  13. begin
  14. { this could give
  15. first arg is 1
  16. second arg is 2
  17. but FPC parses the second arg before the first one ! }
  18. test(_next,_next);
  19. writeln('third arg is ',_next);
  20. writeln('fourth arg is ',_next,' fifth arg is ',_next);
  21. end.