Jump to content

How to create empty arrays? How to delete arrays?


Recommended Posts

Hi all,

I have 2 questions :

1/ I don't know how to create an array that contains zero elements at first.

the code below is invalid :

Local $array[0]

the code below doesn't produce any output :

Local $array
_ArrayAdd($array, "1")
_ArrayAdd($array, "2")
_ArrayDisplay($array)

2/ I don't know how to delete an array

I'd like to remove all the contents of an array at once to make it brand new.

Link to comment
Share on other sites

i use something like this to make empty arrays, not sure if thats what you are looking for

you'll just have to delete empty array at the end or you'll have a blank at the top

Dim $Array[1][2] = [[""]]
Link to comment
Share on other sites

Interesting. Thanks!

It's unnecessary because when an array is created all the elements are set to '' without you having to do anything.

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.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...