tb0139.pp 413 B

12345678910111213141516171819
  1. {%fail}
  2. {
  3. This program should fail compilation since the high()
  4. parameter cannot be used in a cdecl'ed function using
  5. array of const, it uses the exact calling conventions
  6. as a C compiler, and the length is not passed!
  7. }
  8. procedure proc_const_smallarray_const_2(const arr : array of const);cdecl;
  9. var
  10. i: integer;
  11. begin
  12. if high(arr)<0 then
  13. WriteLn('hello world!');
  14. end;
  15. Begin
  16. end.