Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Record-Konstante (https://www.delphipraxis.net/21085-record-konstante.html)

faux 27. Apr 2004 19:43


Record-Konstante
 
Hallo!

Wie kann man denn einen Record als Konstante deklarieren?

also so nicht:

Delphi-Quellcode:
const
  Name: record
    a = 'Eintrag1';
    b = 'Eintrag2';
  end;

Muetze1 27. Apr 2004 20:10

Re: Record-Konstante
 
Moin!

Record vorher definieren und dann eine Konstante von dem Typ:

Delphi-Quellcode:
Type
  TNameRec = Record
    a : String;
    b : String;
  End;

Const
  ConstNameRecord : TNameRec = (a: 'dies'; b: 'das');
Es könnte sein, das bei der Konstantendefinition ein Komma anstatt einem Semikolon hin muss...

MfG
Muetze1


Alle Zeitangaben in WEZ +1. Es ist jetzt 18:08 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz