Jump to content

How to erase content of two dimentinal aray


 Share

Recommended Posts

Yes it is me again, I am working all night to create for my boss script that supposed to be finished as for this morning ...:)

I have two dim array that populated many times with data. I need to erase it each time it populated with new serios of data.

According to the document it should be set to zero. but it is not working for me.

Global $aBSCData[2][12]

I am erasing it this way:

aBSCData=0

What's wrong with that?

Be Green Now or Never (BGNN)!

Link to comment
Share on other sites

I tried this, and it seemed to work in my case.

#include<array.au3>
global $aBSCData[2][12]
for $icc = 1 to 11
$aBSCData[0][$icc] = $icc
$aBSCData[1][$icc] = $icc
next
_ArrayDisplay($aBSCData)
$aBSCData= 0
MsgBox(0,"",$aBSCData)
_ArrayDisplay($aBSCData);<===Will not display if $aBSCData is not an array

It isn't by chance that you are missing the $ in front of $aBSCData= 0

Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance.

Link to comment
Share on other sites

Look at this example:

Dim $array[1] = ["TEST"]

$array[0] = "Change element"

ConsoleWrite("Element 0: " & $array[0] & @CRLF)

Dim $array[1]

ConsoleWrite("Element 0: " & $array[0])

Redim is nondestructive if you are increasing the size of the array.

Dim will destroy the array, regardless of how many dimensions there are.

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...