ForEachInList

From GECK
Jump to: navigation, search


A function added by the New Vegas Script Extender version 6.2.5.

Description

Takes a FormList and a UDF and executes the function once for each element in the list.

Syntax

[help]
ForEachInList source:formList function:udf/lambda 

Example

ref rIter
ForEachInList MyFormList ({rIter} => printvar rIter)

Will print each element in the formlist to console.

Notes

  • This is an alternative to ForEach which may be less verbose, but is less flexible (can't use control-flow statements like Break).

See Also