Page 1 of 1

problem about const array

Posted: Thu May 17, 2007 4:23 am
by bokaw
I defined some const strings. and this strings are elements of a const string array. the bring compile error:Constant expression excepted.
how can i do? there are 58 const string arrays in my project.

Posted: Thu May 17, 2007 7:18 am
by isiticov

I using data structures like the below?how can i do

Posted: Fri May 18, 2007 1:42 am
by bokaw
I using data structures like the below:
const
str1 = 'My String constant 1';
str2 = 'My String constant 2';
str3 = 'My String constant 3';
StrArr: array[0..2] of string = (
str1,
str2,
str3
'My String constant 4 ');

Posted: Fri May 18, 2007 2:55 am
by isiticov
Then you will need either to modify it as desribed in FAQ or to mark this code to skip for TsiLang Expert and add the code to translate the array items manually. Otherwise TsiLang Expert won't be able to handle this.