Re: 32000 indentifier limit in VB6. Help!

Tech-Archive recommends: Fix windows errors by optimizing your registry



The only thing I can think of to add to what has been said involves your
Label controls. Usually, Label names are unimportant to the program's
operation. Making **all** of the Labels on a single form into a Control
Array (assuming you haven't done this already) would save a ton of unique
name assignments. Of course, you would do this for all of your individual
forms.

Rick


"Sly Sid" <SlySid@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:128ECB9C-C34D-4242-BE5C-CB36BDFDDF62@xxxxxxxxxxxxxxxx
Thanks Michael, but I've already renamed just about every label possible
and
removed most code modules to many DLLs. The remaining forms in the project
all interlink (i.e. can call each other via configurable buttons) and
share
many globals. It's a massive 11 year old continuously developing product
with
even the oldest forms growing day by day, so sadly I'm stuck with the
overall
limitations of the construction.
Large scale automated renaming of controls and variables remains an option
but it has to be considered a last resort as we cannot affort to end up
with
an unreadable project given the scale of ongoing development.
What I'm really after is a miracle cure for the limitation itself but I
guess if it's remained through six VB service packs then I'm wishful
thinking
:-(

"Michael C" wrote:

"Sly Sid" <SlySid@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A00B1D3C-A62A-4E37-978B-B6A618D9162B@xxxxxxxxxxxxxxxx
Yeah, thanks Robert. You're correct, all distinct names of variables,
functions, labels, etc. count towards the total, but each name only
counts
once regardless of type or scope.
Exceeding 32000 unique names in a single project simply results in an
unhelpful "Out of Memory" message.
Even individual event names such as cmdXYZ_MouseMove all count, so
duplicating control names as much as possible helps keep the numbers
down
even better than renaming variables, but I'm really loathed to take
drastic
automated action that would make code less readable in such a large and
widely modified application, unless there's really no other solution.

Something automated to rename all labels would surely gain you a fair
amount
of breathing space without reducing readability much. Putting chunks of
code
into dlls might gain you some space also. You could also rename a large
amount of local variables without much reduction in readability.

Michael





.


Quantcast