Difference between revisions of "Ar Erase"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>CSbot
(Automated import of articles)
 
imported>QQuix
(Organizing the Array Functions category list)
 
Line 1: Line 1:
{{BotAddedPage|CSbot|DragoonWraith}}
{{Function
{{Function
  | origin = OBSE
  | origin = OBSE
  | summary =  
  | summary = Erases elements from an array. You may provide a single element, in which case only that element will be erased and only if it is present. Or, you may provide a range in slice notation. Any elements greater than or equal to the lower bound and less than or equal to the upper bound of the range will be erased. If the array is of type Array, elements above the erased elements will be shifted down. Returns the number of elements removed.
 
  | name = ar_Erase
  | name = ar_Erase
  | returnVal = numRemoved
  | returnVal = numRemoved
Line 20: Line 20:
   | type = array
   | type = array
   }}{{FunctionArgument
   }}{{FunctionArgument
   | name = index
   | name = range
   | type = arrayIndex
   | type = slice
   }}
   }}
}}
}}
Line 28: Line 28:
[[Category:Functions (OBSE)]]
[[Category:Functions (OBSE)]]
[[Category:Functions (OBSE v0017)]]
[[Category:Functions (OBSE v0017)]]
[[Category:Array Variable Functions (OBSE)]]
[[Category:Array Functions (OBSE)]]

Latest revision as of 12:15, 18 September 2010

< [[::Category:Functions|Category:Functions]]

A function added by the Oblivion Script Extender.

Syntax:

(numRemoved:short) ar_Erase target:array index:arrayIndex 
(numRemoved:short) ar_Erase target:array range:slice

Erases elements from an array. You may provide a single element, in which case only that element will be erased and only if it is present. Or, you may provide a range in slice notation. Any elements greater than or equal to the lower bound and less than or equal to the upper bound of the range will be erased. If the array is of type Array, elements above the erased elements will be shifted down. Returns the number of elements removed.