Too long to compile?

Hi, i'm having a freak problem. When i'm trying to compile the code, Visual says: "error compiling, sub rutine too long.
I know it's long, but...
Can someone tell me if this is normal How can I compile a large sub rutine

Thanks


Answer this question

Too long to compile?

  • Quintin Willison

    That's interesting, how many lines are in it

    Your solution is to break it up into managable subroutines: it sounds like a complete nightmare to debug/maintain. As a general rule of thumb, a subroutine/function should be no more than a single viewable page.



  • Dimitry

    I forgot to say that i can't break the code in more sub rutines... The Neuronal Net...

  • David Paynter

    Edit | goto will tell you the number of lines.



  • Aulphar

    Well, is very long, i dont kbnow how to see how many lines, but a lot. I get this sub rutine from a program called Neuro Shell 2, and its full of numbers (it's a Neuronal net, my english is not very good :X ). It's just one sub rutine in all the module.I ll try to see how many lines.

  • needhelp1111

    There's an option in the Tools->Options... dialog to how line numbers under Text Editor->Basic->General.

    I would like to ask you why you think you cannot break the code into subroutines. It seems (from what you say) you were supplied the code for this neural network algorithm, an as such paid for it, so you should be able to get some support from the supplier of the code.

    Either way, this may be a limitation of the compiler (I encountered similar limitations in VB5/6), and the best solution will be to break it out, unless Microsoft have a work around.



  • ecardenas

    Well, it didnt work, but thank you anyway. I ll try to use a C code in a C compiler. The simple is te best :D.

    Tanks and good luck

  • Lenin82

    The Menu Edit/Go to didn't work (I have Visaul in spanish, and it dont have that tool, freak). But I used MSWord/Edit/Go to... more or less 2252 lines of sub rutine :S.
    I really need to compile that little sub rutine... is there something i can do i cant break the code into more sub rutines...

  • Kevin C. Kelly

    If you are looking for a workaround.....

    I'd move this question to the IDE forum under Visual Basic.



  • Too long to compile?