Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Konstantes Array (https://www.delphipraxis.net/104656-konstantes-array.html)

Aurelius 8. Dez 2007 12:27


Konstantes Array
 
Hallo DPler :hi:

Wie erstelle ich denn ein konstantes Array? Mit diesem Code geht es ja nicht:
Delphi-Quellcode:
const
  Mask : array[0..10] of string;
  Mask[0] = '.mp3';
  Mask[1] = '.ogg';
  ...
Auch wenn ich den Eintrag Mask : array[0..10] of string; aus dem Konst.-Ausdruck rausnehme und z.B. unter Private schreibe geht es nicht.

ich hoffe auf eure Hilfe :D

Die Muhkuh 8. Dez 2007 12:30

Re: Konstantes Array
 
Fast ;-)

Delphi-Quellcode:
const
  Mask : array[0..10] of string = ('.mp3', '.ogg', ...);

Aurelius 8. Dez 2007 12:35

Re: Konstantes Array
 
OK, Danke sehr :D


Alle Zeitangaben in WEZ +1. Es ist jetzt 10:58 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