Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Is there a unit length limit?



Permlink Replies: 1 - Last Post: Jul 5, 2017 7:34 AM Last Post By: Richard Williams
Richard Williams

Posts: 23
Registered: 6/4/05
Is there a unit length limit?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 5, 2017 1:35 AM
I wonder if anyone could help me.

I have an application for a 3D finite element stress modeller I started years ago in C++ Builder 4. I spent six weeks in 2004 subcontracting as a stress engineer using the EMRC 'NISA' finite element package for aircraft work. At the end of it, I was so sick of the modeller to generate the stress models I rashly said 'Even I can do better than this'. After 6 months of erratic fiddling I had something usable and after a year I had something better than the EMRC modeller. Since then I have made it more functional still. I found in C++ Builder 4 it wouldn't link if the main unit exceeded 65536 lines, so I broke the unit into 3 cpp files, all for the same class & all having the same header #include statement.

Now onto this year. I finally nerved myself up to converting it to C++Builder 10.1 Berlin. At the same time I concatenated the three modeller class units into one .cpp file, of about 69k lines of code.

I have added an extra import method to interpret another file format, and I find I cannot debug it, with line 69000 being sent to debug line 3464 instead (69000 - 65536). So, have I run into a debug line length limit? I have a horrible feeling I may need to split the unit up again.

Regards,

Richard.
Richard Williams

Posts: 23
Registered: 6/4/05
Re: Is there a unit length limit?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jul 5, 2017 7:34 AM   in response to: Richard Williams in response to: Richard Williams
Looks like it is the case, in the debug code window while debugging the program, the highlighted lines show a maximum active and debuggable line number of 65535.

Hmm. How annoying.

May be worth being aware of if you ever use large units.

Regards,

Richard.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02