Subject. Swears at ')' expected but ',' found in line

 ArrayBox : array of array of string = ( ( 'бла', /*тут курсор при компиляции*/ 'бла1' ), // 10 элементов ( /*почти те же самые строки*/ ), // 6 элементов ( /**/ ) // 8 элементов ); 
  • The problem is that you want to add a different number of elements to the dynamic array during initialization. - androschuk

1 answer 1

Dynamic arrays cannot be this way; you must first set the size of the array (SetLength). Then you can fill in the values. This can be done in the Initialization section.

  • > This can be done in the Initialization section. And why there? I would recommend to initialize the array in the right place, in a method call or somewhere else. - androschuk
  • Sometimes this is convenient for a library function. In order not to constantly check the filling of the array, we fill it with initial values ​​at the very beginning of the program, and the programmer can then add / change the array. - Vlad Chapl
  • Yes, in this case it is convenient. - androschuk