Jump to content
Sign in to follow this  

How to erase content of two dimentinal aray

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:


What's wrong with that?

Be Green Now or Never (BGNN)!

Share this post

Link to post
Share on other sites

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

global $aBSCData[2][12]
for $icc = 1 to 11
$aBSCData[0][$icc] = $icc
$aBSCData[1][$icc] = $icc
$aBSCData= 0
_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.

Share this post

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

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  

  • Create New...