Home | Reviews | GUIpedia | Forum | Fun500


HorvatMREDIM SHARED in a SUB or FUNCTION
Does any of you guys have any experience using REDIM on a SHARED array in a SUB or FUNCTION? Even with $DYNAMIC, QB gives me an "Array already dimensioned" error.
2010-08-311:36 PM

trollyRe:REDIM SHARED in a SUB or FUNCTION
i've just tried to redim an array it worked sucessfully this is my code '$DYNAMIC DIM SHARED toto(1 to 20) PRINT UBOUND(toto)
myredim
PRINT UBOUND(toto)   SUB myredim() REDIM toto(1 to 40) END SUB 

the ouput was 20
40
2010-08-314:21 PM

HorvatMRe:REDIM SHARED in a SUB or FUNCTION
So when using REDIM on a SHARED array you have to omit the SHARED. It works, thanks!
2010-09-018:21 AM

BASIC Programming Help


2021 Brandon Cornell