Sign in to follow this  
Followers 0
myspacee

Clear an Array

5 posts in this topic

Know function _ArrayDelete ( $avArray, $iElement )

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

thank you,

m.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

thank you for reply martin,

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

use it for different while cicle...

thank you again !

m.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

.. But there is also a ReDim funciton (see help file) that can resize an array without destroying its contents.

Good point salty!

8)


NEWHeader1.png

Share this post


Link to post
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
Sign in to follow this  
Followers 0