Editing Ar Size
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 12: | Line 12: | ||
<pre> | <pre> | ||
array_var aBeatles | array_var aBeatles | ||
int iSize | |||
Ar_Size aBeatles ; | let iSize := Ar_Size aBeatles ; iSize == -1, not initialized | ||
let aBeatles := Ar_List JohnREF, PaulREF, GeorgeREF, RingoREF | let aBeatles := Ar_List JohnREF, PaulREF, GeorgeREF, RingoREF | ||
Line 21: | Line 22: | ||
</pre> | </pre> | ||
To use in a conditional statement, [[Eval]] is required: | |||
<pre> | <pre> | ||
array_var SomeArray | |||
if eval Ar_Size SomeArray > 5 | if eval Ar_Size SomeArray > 5 | ||
; SomeArray contains more than 5 elements | ; SomeArray contains more than 5 elements | ||
endif | endif | ||
</pre> | |||
==Notes== | |||
*Since arrays are zero based indexed, the last element is always: | |||
<pre> | |||
let iLastIndex := (Ar_Size SomeArray) - 1 | |||
</pre> | </pre> | ||
==See Also== | ==See Also== |