texan Posted January 10, 2011 Share Posted January 10, 2011 I am a little confused on how to best manage an array. There doesn't appear to be a way to have an empty array, that is, an array with no elements. If I try to define the array as: Dim $Array[] or Dim $Array[0]the code will not compile. So I start out defining the array as Dim $Array[1]The problem with defining the array like this is that it leaves a single blank value in the array. When I use the _ArrayAdd() UDF the blank value in the array always remains and the array appears to have one more item then desired. I don't see how you can use _ArrayADD without this occuring. What am I missing? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted January 10, 2011 Moderators Share Posted January 10, 2011 texan, You are not alone.! Enjoy the read! M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
texan Posted January 10, 2011 Author Share Posted January 10, 2011 M23, thanks again. That clears that up. Now, on a side note, I was a little puzzled why your linked post didn't show in my search results when I did a search of all forums for "empty array". That other forum post was titled "Declaring an empty array", you think that would show near the top of the search results. But, what I realized now is that the search results are displayed based on Last Update Time, Title(alphabetically), Number replies or Views. There doesn't appear to be anything to display the search results based on relevance. I did a google search using "empty array site:autoitscript.com/forum/" and that post was second in the list so I will use google from now on to search instead of the built in search. Link to comment Share on other sites More sharing options...
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