Jump to content
Sign in to follow this  
MattHiggs

(Solved) Passing arrays into functions

Recommended Posts

MattHiggs

Hey.  Just a quick syntax question.  If I am passing an array into a custom function, in the area where the function is declared, would the arrays be passed as regular variables (Func myFunc ($array1, $array2 )) or do they need the brac

Edited by MattHiggs

Share this post


Link to post
Share on other sites
InunoTaishou

Regular variables

$test_array[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

UseThisarray($test_array)

Func UseThisArray($aArray)
    For $i = 0 to UBound($aArray) - 1
        ConsoleWrite($aArray[$i] & @LF)
    Next
EndFunc

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×