Page MenuHomeFeedback Tracker

Command to "unset" arrays
Closed, ResolvedPublic

Description

There is a command to set arrays (<array> set [<index>,<value>]), not to unset.

For now, it's possible to remove an element (specifically a nested array) from an array with this "tricky magic" process:

  1. Find the index of the element to remove with 'find' command (mostly used with loop functions)
  2. Turn the element into a unique string as : <array> set [<index>,"myStringToRemove"]
  3. Subtract the string from array : <array> - ["myStringToRemove"]

It's a very labored process and it certainly uses more resources than necessary.
The request concerns steps 2 and 3 which are to be optimized.

Would it be possible to introduce a new command to simply remove an element from an array, passing its index and regardless its type?

It could be : <array> unset <index>

This command would be great :)

Details

Legacy ID
1168971624
Severity
None
Resolution
Fixed
Reproducibility
Always
Category
Feature Request

Event Timeline

Steezy edited Steps To Reproduce. (Show Details)Aug 5 2014, 1:56 PM
Steezy edited Additional Information. (Show Details)
Steezy set Category to Feature Request.
Steezy set Reproducibility to Always.
Steezy set Severity to None.
Steezy set Resolution to Fixed.
Steezy set Legacy ID to 1168971624.May 7 2016, 7:09 PM
Bohemia added a subscriber: Steezy.Aug 5 2014, 1:56 PM
Steezy added a comment.Aug 5 2014, 4:21 PM

Possibility to unset one index or an array of indexes would be a plus.

<array> unset <index>
or
<array> unset [<index1>,<index2>,<index3>]

Mass-closing all resolved issues not updated in the last month.

Please PM me in BI Forums (http://forums.bistudio.com/member.php?55374-Fireball) if you feel your bug was closed in error.