Einzelnen Beitrag anzeigen

jottkaerr

Registriert seit: 2. Jul 2007
Ort: Tuttlingen
81 Beiträge
 
Delphi 10.1 Berlin Professional
 
#14

AW: Ungelöst: TMeinSet(Byte(1)) in Variable > ungültige Typumwandlung

  Alt 4. Jun 2019, 14:56
Bist Du sicher, dass Du auch früher schon Integer-Literale direkt gecastet hast? Wenn ich statt
Delphi-Quellcode:
var
  GroupSet: TGroupSet;
begin
  GroupSet := TGroupSet(Byte(2));
end.
Delphi-Quellcode:
var
  b: Byte;
  GroupSet: TGroupSet;
begin
  b := 2;
  GroupSet := TGroupSet(b);
end.
schreibe, funktioniert's.
Jürgen Krämer
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us. (Calvin)
  Mit Zitat antworten Zitat