Enivid Posted November 14, 2008 Posted November 14, 2008 Is there a way to declare a 2D array with pre-initialized values using arrays.au3? Thanks
Richard Robertson Posted November 14, 2008 Posted November 14, 2008 No. The Array Create function from array.au3 shouldn't be used anymore anyways. Use the functionality that is built into the syntax of the language for declaring filled arrays.
Enivid Posted November 14, 2008 Author Posted November 14, 2008 Is there a way to do it at all then? In the help file I only see examples of filling up a multi dimensional array one value at a time.
martin Posted November 14, 2008 Posted November 14, 2008 Enivid said: Is there a way to do it at all then? In the help file I only see examples of filling up a multi dimensional array one value at a time.You can declare an array and set initial values at the same time as shown in the help for Dim. Is that what you mean? Quote To initialize an array, specify the values for each element inside square brackets, separated by commas. For multiple dimensions, nest the initializers. You can specify fewer elements in the initializer than declared, but not more. Function calls can also be placed in the initializers of an array. If the function call returns an array, then the one array element will contain that returned array. Dim $Array1[12]=[3, 7.5, "string"], $array[5] = [8, 4, 5, 9, 1] Dim $Grid[2][4]=[["Paul", "Jim", "Richard", "Louis"], [485.44, 160.68, 275.16, 320.00]] Dim $Test[5] = [3, 1, StringSplit("Abe|Jack|Bobby|Marty", "|"), Cos(0)] Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
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