![]() |
Klassenvervollständigung und set of Byte
Hallo,
Wenn ich in einer Klassendeklaration per STRG-SHIFT-C vervollständigen lasse, dann kommt die Fehlermeldung: "END erwartet, aber SET gefunden in Klasse TMyRec". In folgendem code:
Delphi-Quellcode:
Was muss ich ändern damit die Fehlermeldung nicht mehr kommt? Manuell funktioniert der code.
unit Unit2;
interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls; type TMyRec = packed record Aset: set of Byte; end; TForm2 = class(TForm) Button1: TButton; private procedure TestProc; { Private-Deklarationen } public { Public-Deklarationen } end; var Form2: TForm2; implementation {$R *.dfm} end. |
AW: Klassenvervollständigung und set of Byte
Es klappt wahrscheinlich wenn du einen Typen für das set of Byte deklarierst und den stattdessen im Record verwendest.
|
AW: Klassenvervollständigung und set of Byte
Vielen Dank.
Manchmal ist es ganz einfach. So geht es:
Delphi-Quellcode:
unit Unit2;
interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls; type TmySetOfByte = set of Byte; TMyRec = packed record Aset: TmySetOfByte; end; TForm2 = class(TForm) Button1: TButton; private procedure TestProc; { Private-Deklarationen } public { Public-Deklarationen } end; var Form2: TForm2; implementation {$R *.dfm} { TForm2 } procedure TForm2.TestProc; begin // end; end. |
Alle Zeitangaben in WEZ +1. Es ist jetzt 03:54 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz