Rubyists,
I know I am missing something obvious here. How do I
find the number of elements in an array from C? In other
words, what is the equivalent of Array#size/length in C?
TIA,
-mark.
Rubyists,
I know I am missing something obvious here. How do I
find the number of elements in an array from C? In other
words, what is the equivalent of Array#size/length in C?
TIA,
-mark.
Doh!
At 06:05 AM 12/10/2002 +0900, I wrote:
I know I am missing something obvious here. How do I
find the number of elements in an array from C? In other
words, what is the equivalent of Array#size/length in C?
RARRAY(arr)->len
-mark.
Hi,
It is mentioned “informally” on the second page of “Extending
Ruby” Chapter in the pickaxe book (p. 172). It is ‘RARRAY(arr)->len’,
which is of type ‘long’. (Well, in this case actually we are dealing with
the internal structure of RARRAY; just hope that Matz will never change
it…)
Regards,
Bill
Mark Probert probertm@nortelnetworks.com wrote:
Rubyists,
I know I am missing something obvious here. How do I
find the number of elements in an array from C? In other
words, what is the equivalent of Array#size/length in C?