tb0160.pp 526 B

12345678910111213141516171819202122232425262728293031
  1. { Old file: tbs0191.pp }
  2. { missing vecn constant evaluation OK 0.99.11 (PM) }
  3. type
  4. trec=record
  5. a,b : longint;
  6. end;
  7. prec=^trec;
  8. const
  9. s : string = 'test';
  10. cfg : array[1..2] of trec=(
  11. (a:1;b:2),
  12. (a:3;b:4)
  13. );
  14. pcfg : prec = @cfg[2];
  15. l : ^longint = @cfg[1].b; { l^ should be 2 }
  16. pc : pchar = @s[1];
  17. begin
  18. Writeln(' l^ = ',l^);
  19. Writeln('pc[0] = ',pc[0]);
  20. if (l^<>2) or (pc[0]<>'t') then
  21. Begin
  22. Writeln('Wrong code generated');
  23. RunError(1);
  24. End;
  25. end.