Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1028059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:19:43+00:00 2026-05-16T12:19:43+00:00

I am having a compilation problem with my code in Delphi 2006. I am

  • 0

I am having 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 a procedure I call at the start of the program, I assign values to this array. This code is automatically generated by a script that I wrote. It consists of lines similar to the next one:

fsi_names[idFSI_FLIGHT_PATH_ANGLE] := 'FSI_FLIGHT_PATH_ANGLE';

There are overall around 2000 elements to be assigned in this array. I couldn’t find out the magic number where the compiler dies, but it works with 1853 and doesn’t with 2109.

The thing is that I need this array to convert an ID (which is the index to the array) to a name as a string for various applications.

I know that if I would split the list of assignments and put the parts into different procedures, then it works out. But since the code is auto-generated and changes often, this method is not quite comfortable.

I also thought about putting the contents into a file and read it at runtime, but I would rather keep the number of files I have to ship to a minimum. Also, I would like to protect the contents from the average user, so that he doesn’t mess with it.

Do you have an idea how I could either overcome the limitation of the compiler, or change my code to achieve my goal?

Help is very much appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T12:19:44+00:00Added an answer on May 16, 2026 at 12:19 pm

    I FOUND A SOLUTION!

    If I initialize my array at the point where I define it, then the compiler does not spit out the error message:

    const
      fsi_names : array [0..FSI_NUM_VARS-1] of string = (
        'NAME 0',
        'NAME 1',
        ...
        'LAST NAME'
        );
    

    As far as I can tell, there is no limit regarding the number of string literals if I do it like that.

    Thank you so much for your ideas, the one by mj2008 was most helpful!

    Have a nice day

    Flo

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having a problem with my animations flickering upon completion. I'm using a mix
I am having a problem stepping into code which is a website hosted on
[Updated below] I am having a problem connecting to a MySQL database using a
I'm having a problem with implicit conversion in the following code: trait A {
I'm having a bit of an odd problem while trying to compile some code
m having problem in operating on richtextbox from another class m using backgroundworker class
I am having problem with following code. Its showing compliation error:- Identifier Expected. <script
Magento 1.4.2 Having compilation errors and the page doesn't render. I get errors but
Having trouble with each function... Will try to explain by example... In my code,
the problem is the following. We have a (rather large) code base in form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.