Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to post array to function?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
hi!

i have data-sentences in my little program

i made an simple array using DIM

i want to use this array in function, how can i do that? if i try to send the array with functionname(arrayname$) - it doesn't seem to work..

i need whole array in my function, not just one member

regards,
martin
 
what i want is that instead of some variable like $a i want to pass an array i defined with dim myarray(30) and filled with READ.
how?

I need thease values badly...

martin.
 
DECLARE SUB myfunc (myarray() AS INTEGER)
DIM myarray%(30)

DEFINT A-Z
FOR i = 1 TO 30
READ myarray%(i)
NEXT i
CALL myfunc(myarray%())

DATA 1,2,3,4,5,6,7,8,9,10
DATA 11,12,13,14,15,16,17,18,19,20
DATA 21,22,23,24,25,26,27,28,29,30

DEFSNG A-Z
SUB myfunc (myarray() AS INTEGER)
FOR i = 30 TO 1 STEP -1
PRINT myarray%(i); ",";
NEXT
END SUB

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top