Jump to content

Clear an Array


Recommended Posts

Know function _ArrayDelete ( $avArray, $iElement )

can you explain code to clear an Array with 100 position ?

thank you,

m.

If you mean you have an array with 100 elements which you want all set to '' then just declare it a gain

Dim $Array[100]
$Array[99] = 'pasta'
consolewrite($Array[99] & @CRLF)
DIm $Array[100]
consolewrite($Array[99] & @CRLF)
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

so re-declare it clear all array content ? (Dim $Array[100])

Careful with your definitions there.

Declaring an array again with Global/Local/Dim will wipe out previous contents. But there is also a ReDim funciton (see help file) that can resize an array without destroying its contents.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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...