Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there a limit on....
#1
is there a limit on how many arguements i can send from a call sub?
Reply
#2
Nothing is specified here: http://qbasicnews.com/qboho/qckadvr.subr.shtml

So I guess that the real limit is the available memory during compiling and/or the maximum line size which happens to be 255 characters.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#3
has something to do with stack space as well, no?
Reply
#4
maybe thats why im getting out of stack error...
Reply
#5
proably =pP

just make sure that you dont call too many subs within subs, return as often as possible
Reply
#6
Quote:maybe thats why im getting out of stack error...
No, its quite improbable that you'll get out of stack space error due to excessive 'arguments' in a sub routine. Exactly how many arguments do you pass?
Reply
#7
From here , the maximum number of arguments is 60...
http://qbasicnews.com/qboho/qckadvr@l8209.shtml
Antoni
Reply
#8
im no where near 60 arguements. ill show u guys the code
Reply
#9
here is my coding:
http://home.ripway.com/2005-1/246021/Game.bas

here are the sequencial files that are needed to run the game. the game is not complete and there are alot of bugs. change the constants if it says path not found.
image: http://home.ripway.com/2005-1/246021/pic.zip

one problem is the out of stack error

the other is i dunno why the walking animation does not occur. it should move its legs and arms.
Reply
#10
As stated, you problem has nothing to do with number of parameters. But for your info, I think this is one more than the max.

It gets an error, but if you omit the ,d6 it works fine.

Mac

Code:
DEFINT A-Z
SUB a (b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, a1, a2, a3, a4, a5, a6, a7, a8, a9, a0, b1, b2, b3, b4, b5, b6, b7, b8, b9, b0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c0, d1, d2, d3, d4, d5, d6)
PRINT "abc"
END SUB
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)