Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"Module level code too large"
#1
Hi, I'm making a program and it's getting a bit large so I got this annoying message "Module level code too large". So I can't add any more lines in my program Sad Does anyone know how I can fix this and make the file as large as I want?
Reply
#2
But it appears to be fairly clear. If your module's too big, you need to make it smaller, i.e., split your file up into (at least) two separate files, compile them separately, and then link them. If that file is composed of separate subroutines, the process should be fairly straightforward. If not, well, you have to rewrite it so that it uses subroutines.
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Reply
#3
Is there no way to be able to create a larger module (so that I only have to make 1 file)? Because I don't know how I should link two separate files :???: But thanks for the advice anyway.
Reply
#4
Either you're using **WAY** too much tabbing, or it's something other than code size.

I tried ~130KB code size, and it still works in the IDE.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#5
your error message means that you have to move some of the code from your main routine into subroutines or functions. You apparently don't necessarily have to split your program up into separate files.
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Reply
#6
Ok...Can I use GOTO for that or do I have to use GOSUB?
Reply
#7
and GOSUB wouldn't work either. GOSUBroutines are still part of the module level code. You'd have to use SUB statements and access your subroutines with CALL or else use FUNCTIONs,

e.g.,

SUB MYSUB(VAR1, VAR2)

and then you'd run the code in MYSUB with

CALL MYSUB(VAR1, VAR2)
line of code
line of code
.
.
.
END SUB

or

FUNCTION MYFUNC(VAR1, VAR2)
line of code
line of code
.
.
.
END FUNCTION

and then you'd use MYFUNC via something like

A = MYFUNC

(You need to use a DECLARE statement with functions and if you use one for your SUBs, you don't need to use CALL and you leave off the parentheses in the call statement.)
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)