using ArraySize: Macros for Max and Count
Posted: Tue Jan 19, 2021 12:03 am
A couple of very simple macros, largely to save a bit of typing (I seem to constantly and tediously forget the () when using ArraySize).
For me it also makes me think which I really want.
1. How many elements are there in an array, right now?
2. What is the current highest subscript for an array?
Of course, the initial A is to distinguish them from the many other contexts of 'Count' and 'Max'.
For me it also makes me think which I really want.
1. How many elements are there in an array, right now?
Code: Select all
Macro ACount(zArr)
ArraySize(zArr())+1
EndMacro
Code: Select all
Macro AMax(zArr)
ArraySize(zArr())
EndMacro