I have a compilation problem with my code in Delphi 2006. I am using a static String array:
fsi_names : array [0..FSI_NUM_VARS-1] of string;
In the procedure that I call at the beginning of the program, I assign values to this array. This code is automatically generated by the script I wrote. It consists of lines similar to the following:
fsi_names[idFSI_FLIGHT_PATH_ANGLE] := 'FSI_FLIGHT_PATH_ANGLE';
About 2,000 elements should be specified in this array. I could not find out the magic number where the compiler dies, but it has been working since 1853 and not since 2109.
The thing is, I need this array to convert the identifier (which is an index into an array) into a name as a string for various applications.
I know that if I split the list of assignments and put the parts in different procedures, then this will work. But since the code is auto-generated and often changes, this method is not entirely convenient.
I also thought about putting the contents into a file and reading it at runtime, but I would rather keep the number of files that I have to deliver to a minimum. In addition, I would like to protect the content from the ordinary user so that he does not mess with him.
Do you have an idea how I can either overcome the compiler limitation or change my code to achieve my goal?
Help is much appreciated.
source
share