Statistics: Posted by Joe — Tue Aug 28, 2007 6:34 pm
Statistics: Posted by Raspberrypicker — Tue Aug 28, 2007 6:18 pm
Statistics: Posted by Raspberrypicker — Mon Aug 27, 2007 7:40 pm
Don't use SHARED if you don't have to. Pass everything as arguments into the sub. Abusing SHARED can easily lead to spaghetti code. That's my advice, even though I don't follow it all the time.I think that's the only part I didn't do...plus DIM SHARED. So basically when I add SHARED to it, it lets me "share" the array between subs, ok I got it now.
Statistics: Posted by Joe — Mon Aug 27, 2007 9:20 am
Code:
DECLARE SUB MySub (Array%())DIM SomeStuff%(5,5)MySub SomeStuff%() SUB MySub(Array%()) FOR A=1 TO 5 FOR B = 1 to 5 Array%(A,B) = A*B NEXT B NEXT A END SUB
Code:
DECLARE SUB MySubDIM Shared SomeStuff%(5,5)MySubSUB MySubFOR A=1 TO 5 FOR B = 1 to 5 Array%(A,B) = A*B NEXT B NEXT A END SUB
Statistics: Posted by BadMrBox — Sun Aug 26, 2007 7:23 pm
Statistics: Posted by Raspberrypicker — Sun Aug 26, 2007 4:02 pm
Code:
DECLARE SUB MySub (Array%())DIM SomeStuff%(5,5)MySub SomeStuff%()SUB MySub(Array%())FOR A=1 TO 5 FOR B = 1 to 5 Array%(A,B) = A*B NEXT BNEXT AEND SUB
Statistics: Posted by Patz QuickBASIC Creations — Sat Aug 25, 2007 9:48 pm
Statistics: Posted by Raspberrypicker — Sat Aug 25, 2007 8:37 pm