Modify

Opened 12 years ago

Closed 7 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 by Melba23, 12 years ago

Owner: set to Jon
Status: newassigned

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 by BrewManNH, 7 years ago

Resolution: Rejected
Status: assignedclosed

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.

Modify Ticket

Action
as closed The owner will remain Jon.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.