tnestedset.pp 422 B

12345678910111213141516171819202122232425262728293031
  1. program tnestedset;
  2. {$mode delphi}
  3. uses
  4. jdk15;
  5. type
  6. tnestedfpstructenum = (ea,eb,ec);
  7. tnestedfpstructenumset = set of tnestedfpstructenum;
  8. procedure test(var s: tnestedfpstructenumset);
  9. procedure sub;
  10. begin
  11. s:=s+[eb];
  12. end;
  13. begin
  14. sub
  15. end;
  16. var
  17. s: tnestedfpstructenumset;
  18. begin
  19. test(s);
  20. if s<>[eb] then
  21. raise jlexception.create;
  22. jlsystem.fout.println(jlstring(juenumset(@s).toString));
  23. end.