Guest ero Posted February 25, 2005 Posted February 25, 2005 Hi, I'm now evaluating AutoIt v3. Could you show me some example explaining how to use array as function parameter. How to declare it, use it in the function. Thx
Developers Jos Posted February 25, 2005 Developers Posted February 25, 2005 Hi,I'm now evaluating AutoIt v3.Could you show me some example explaining how to use array as function parameter.How to declare it, use it in the function.Thx<{POST_SNAPBACK}>Open the helpfile for this UDF : _ArrayDisplay and check out the example.. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Guest ero Posted February 26, 2005 Posted February 26, 2005 Open the helpfile for this UDF : _ArrayDisplay and check out the example..<{POST_SNAPBACK}>Thanks for your answer JdeB.But _ArrayDisplay example don't give me any answer to what is my real problem.Maybe I was not very clear but what I'm looking for is some example showing me how to declare (syntax) some function's array (mono and multi-dimensionned) parameter in the function call prototype in itself.Example:Func MyFunc ($array[] ??? or array[10] ??? or.....)...EndFuncOther Question: Inside MyFunc is it possible to REDIM $array input parameter ?Thx
Developers Jos Posted February 26, 2005 Developers Posted February 26, 2005 Thanks for your answer JdeB.But _ArrayDisplay example don't give me any answer to what is my real problem.Maybe I was not very clear but what I'm looking for is some example showing me how to declare (syntax) some function's array (mono and multi-dimensionned) parameter in the function call prototype in itself.Example:Func MyFunc ($array[] ??? or array[10] ??? or.....)...EndFuncOther Question: Inside MyFunc is it possible to REDIM $array input parameter ?Thx<{POST_SNAPBACK}>Ok here's a quick example that shows a redim in a function:Dim $avArray[8] $avArray[0] = 7 $avArray[1] = "Brian" $avArray[2] = "Jon" $avArray[3] = "Larry" $avArray[4] = "Christa" $avArray[5] = "Rick" $avArray[6] = "Jack" $avArray[7] = "Gregory" demo( $avArray ) msgbox(0,'demo',$avArray[8]) Exit Func Demo(ByRef $A_in) ReDim $A_in[UBound($A_in)+1] $A_in[UBound($A_in)-1] = "Extra value" EndFunc SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Guest ero Posted February 26, 2005 Posted February 26, 2005 Ok here's a quick example that shows a redim in a function:Dim $avArray[8] $avArray[0] = 7 $avArray[1] = "Brian" $avArray[2] = "Jon" $avArray[3] = "Larry" $avArray[4] = "Christa" $avArray[5] = "Rick" $avArray[6] = "Jack" $avArray[7] = "Gregory" demo( $avArray ) msgbox(0,'demo',$avArray[8]) Exit Func Demo(ByRef $A_in) ReDim $A_in[UBound($A_in)+1] $A_in[UBound($A_in)-1] = "Extra value" EndFunc<{POST_SNAPBACK}>You are the best :-))Thx
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now