Modify

Opened 10 years ago

Closed 6 years ago

#2845 closed Bug (Rejected)

Empty Array isn't Empty

Reported by: anonymous Owned by: Jon
Milestone: Component: AutoIt
Version: 3.3.13.17 Severity: None
Keywords: array empty Cc:

Description

Local isntEmpty = []
Local isntEmpty2 [] = []

These two arrays shouldn't contain an empty string. They should be empty.

Attachments (0)

Change History (2)

comment:1 Changed 10 years ago by Melba23

  • Owner set to Jon
  • Status changed from new to assigned

Not a regression - 3.3.12.0 gives the same result.

#include <Array.au3>

Local $aIsEmpty1[]
Local $aIsEmpty2[0]
Local $aIsEmpty3[0] = []
Local $aIsNottEmpty1 = []
Local $aIsNottEmpty2[] = []

ConsoleWrite(UBound($aIsEmpty1) & @CRLF)
ConsoleWrite(UBound($aIsEmpty2) & @CRLF)
ConsoleWrite(UBound($aIsEmpty3) & @CRLF)
ConsoleWrite(UBound($aIsNottEmpty1) & @CRLF)
ConsoleWrite(UBound($aIsNottEmpty2) & @CRLF)

It seems that assigning empty elements actually adds an element unless the array size is specifically set to 0.

M23

comment:2 Changed 6 years ago by BrewManNH

  • Resolution set to Rejected
  • Status changed from assigned to closed

Not sure if this bug was fixed or not, but the test scripts no longer run under the current version of AutoIt, so this can't happen at this time. Closing the ticket to clean up the bug tracker from unnecessary clutter.

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The owner will remain Jon.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.