Advertisement
WarPie90

Crash - Enum - Lape

Sep 29th, 2015
369
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Delphi 0.27 KB | None | 0 0
  1. //both these can crash lape
  2. program new;
  3. type E = (ea, eb, ec, ed=9);  //this can crash lape from time to time
  4. begin
  5.   WriteLn(ed); //InvalidEnum(..)
  6. end;
  7.  
  8. // test 2
  9. type E = (ea=1, eb=2, ec=5, ed=9);
  10. var aa:E;
  11. begin
  12.   aa := ed;
  13.   WriteLn(ed); //InvalidEnum(..)
  14. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement