Create a constant array of strings

none picture none · Nov 1, 2010 · Viewed 73k times · Source

Is there a way in Delphi declaring an array of strings such as following one?

{'first','second','third'}

Answer

RRUZ picture RRUZ · Nov 1, 2010

try this

Const
Elements =3;
MyArray  : array  [1..Elements] of string = ('element 1','element 2','element 3');