Page 1 of 1

help me! how to use array in procedure.

Posted: Tue Aug 29, 2006 8:59 am
by PureBoy

Code: Select all

Dim array.s(5)
array(1)="23423423"
Procedure outarray(ary.s())
Debug ary(1)

EndProcedure

outarray(array)

Posted: Tue Aug 29, 2006 9:06 am
by ts-soft

Code: Select all

Dim array.s(5)

array(1)="23423423"

Procedure outarray(ary.s(1)) ; 1 = one dimension
  Debug ary(1)
EndProcedure

outarray(array())

Posted: Tue Aug 29, 2006 9:29 am
by PureBoy
thank you very mach!

Posted: Tue Aug 29, 2006 2:59 pm
by kenmo
Or just
Global Dim

Posted: Tue Aug 29, 2006 8:51 pm
by PB
> Or just
> Global Dim

No, that doesn't work.

Posted: Wed Aug 30, 2006 2:52 pm
by Thalius
or use the "Shared" keyword:

Code: Select all

Dim array.s(5)
array(1)="23423423"

Procedure outarray()
Shared array()
  Debug array(1)
EndProcedure

outarray() 
Cheers, Thalius