Jump to content

Variables & Arrays


Recommended Posts

14 hours ago, BrewManNH said:

But it's necessary for clarity, such as the reference to declaring a Global Static variable being meaningless.

I said it was an exception in the next sentence. However one thing I said was incorrect: I'm about to change that.

Edited by czardas
Link to comment
Share on other sites

On lundi 4 juin 2018 at 3:44 PM, Melba23 said:

pixelsearch,

You can initially declare the array as Global $aHistorique[0][9] - then you will not get the blank line.

M23

Hi Melba23

I started to change my few scripts using this relatively new feature you explained me (the [0] row during declaring the Array, to avoid a blank row if the Array is intented to be populated with __ArrayAdd)

All when fine except one thing which created an error in the include file ArrayDisplayInternals.au3 , function __ArrayDisplay_Share, line 343,  $vTmp = $aArray[$i][$j] . The error can be reproduced like this :

#include <Array.au3>
Global $aHistorique[0][9]
_ArrayDisplay($aHistorique, "Title")  ; ok
_ArrayDisplay($aHistorique, "Title", "|4")  ; error and Console shows :

"C:\Program Files\AutoIt3\Include\ArrayDisplayInternals.au3" (343) : ==> Variable subscript badly formatted.:
$vTmp = $aArray[$i][$j]
$vTmp = $aArray[^ ERROR

Displaying the variables with MsgBox placed immediately before line 343 shows this : $i = -1 and $j = 0
This didn't happen when using Global $aHistorique[1][9] because the Array display showed the 1st columns of an empty row.

Hoping these informations were useful
 


 

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