• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 506
  • Last Modified:

Procedure Too Large -- But Only In Debug Mode

I have some legacy code that compiles fine. However, when I run it in debug mode, this one function stops with "procedure too large". Is there something easy that I can set/fix? Changing this code to reduce code might be a pain.
0
GivenRandy
Asked:
GivenRandy
  • 3
  • 3
  • 3
  • +1
1 Solution
 
Carl TawnSystems and Integration DeveloperCommented:
Hmm, never seen that one before. Any chance you can break the procedure down into smaller sub routines ?
0
 
GivenRandyAuthor Commented:
Yeah, but I'd rather not (has to go through a lot of testing, etc.). Was hoping there was something "strange", like some setting. If not, will have to modify the code. :(
0
 
Carl TawnSystems and Integration DeveloperCommented:
Just out of curiosity, how long is your procedure ?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
rockiroadsCommented:
Why dont u break it up into smaller procedures?
Just a work around suggestion


sub Proc1
   'do some stuff

    'Call another procedure to continue
    Proc2
end sub

sub Proc2
   'do some stuff

    'Call another procedure to continue
    Proc3
end sub

etc

0
 
rockiroadsCommented:
checking the net, I found one site that says

if this is a treeview programme, then you can list a long segment under a separate procedure and call this procedure in the main programme.
i have done this and it works smoothly.



0
 
GivenRandyAuthor Commented:
>Just out of curiosity, how long is your procedure ?

4,626 lines
122,146 characters (not counting whitespace)
201,639 characters (counting whitespace)
0
 
Carl TawnSystems and Integration DeveloperCommented:
wow, thats one big procedure. Apparently the max size for a procedure is 64K:

    http://www.aivosto.com/vbwatch/help/faq.htm
0
 
justchat_1Commented:
I think that means you have no choice but to break the procedure up into three parts...
0
 
GivenRandyAuthor Commented:
Yep, I was afraid of that. It's going to be a pain.
0
 
rockiroadsCommented:
Will it be that bad?

The workaround I gave, which is what u are look like your doing now anyway
If u make those variables in that procedure globals to that mod
it may work, no?

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now