Difference between revisions of "Ar Find"

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
Line 23: Line 22:
[[Category:Functions (OBSE)]]
[[Category:Functions (OBSE)]]
[[Category:Functions (OBSE v0017)]]
[[Category:Functions (OBSE v0017)]]
[[Category:Array Variable Functions (OBSE)]]
[[Category:Array Functions (OBSE)]]

Revision as of 12:15, 18 September 2010

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

A function added by the Oblivion Script Extender.

Syntax:

(key:stringOrNumber) ar_Find value:stringOrNumberOrForm arrayToSearch:array inRange:range

Locates the first occurrence of the specified value within an array and returns the key associated with it. A range may optionally be specified using range notation, i.e. let key := ar_Find "tofind" arrayVar lowerBound:upperBound. If the value is not found, the function returns an empty string (for string-indexed arrays) or the value -99999.0 (for numeric-index arrays).