sub argument limit ?

new BookmarkLockedFalling
kaalidor
New Member
*

kaalidor Avatar

Posts: 42

Post by kaalidor on Feb 15, 2008 17:31:46 GMT -5

hi,

i've got a problem to pass more than 5 arguments to my sub !
is there a limitation ?

call sub1 "Baron Dupeyroux", "2004", "Bordeaux", "Rouge", "bdupbr05mini.jpg", "hd1"
wait

sub sub1 nom,ドル mill,ドル app,ドル color,ドル pic,ドル id$
end sub


regards,
pascal
Last Edit: Feb 15, 2008 18:59:25 GMT -5 by kaalidor
turbov21
Guest

Guest Avatar

Post by turbov21 on Feb 15, 2008 18:48:27 GMT -5

kaalidor said:
i've got a problem to pass more than 5 arguments to my sub !
is there a limitation ?


Five seems to be the limit. You might try something like this:

run "StrFunc", #sf

Call words1 "1,2,3,4,5,6", ","

wait

sub words1 txt,ドル splt$
cnt = 0

while cnt <= #sf CountInStr(splt,ドル txt$)
cnt = cnt + 1
print #sf SplitStr$(splt,ドル txt,ドル cnt)
wend
end sub

StrFunc is free for anyone who wants it.
Last Edit: Feb 15, 2008 18:49:29 GMT -5 by turbov21
kaalidor
New Member
*

kaalidor Avatar

Posts: 42

Last Edit: Feb 15, 2008 19:02:04 GMT -5 by kaalidor
carlgundel
Administrator
*****
Creator of Run BASIC

carlgundel Avatar

Posts: 975

kaalidor
New Member
*

kaalidor Avatar

Posts: 42