Ar Size
From GECK
A function added by the New Vegas Script Extender.
Contents
Description
Returns the number of elements contained in an Array, or -1 if the array has not been initialized
Syntax
(int) Ar_Size ToCheck:array
Example
array_var aBeatles Ar_Size aBeatles ; returns -1, not initialized let aBeatles := Ar_List JohnREF, PaulREF, GeorgeREF, RingoREF Ar_Size aBeatles ; now returns 4
Conditional example:
if eval (Ar_Size SomeArray) > 5 ; SomeArray contains more than 5 elements endif
See Also
- Array Variables
- Ar_Construct
- Ar_Resize
- Ar_List
- Let
- Eval
- ListGetCount (equivalent for FormLists)
- GetNumLevItems (equivalent for Leveled Lists)