You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
639 B
Groff
21 lines
639 B
Groff
21 years ago
|
.TH array_length 3
|
||
|
.SH NAME
|
||
|
array_length \- get number of allocated members in array
|
||
|
.SH SYNTAX
|
||
|
.B #include <array.h>
|
||
|
|
||
|
int64 \fBarray_length\fP(array* \fIx\fR,uint64 \fImembersize\fR);
|
||
|
|
||
|
array \fIx\fR;
|
||
|
int64 members = array_length(&\fIx\fR,sizeof(\fIt\fR));
|
||
|
|
||
|
.SH DESCRIPTION
|
||
|
array_length returns the number of initialized bytes in \fIx\fR, divided
|
||
|
by the size of \fIt\fR. In other words, array_get will succeed for
|
||
|
positions 0 through array_length-1; it will fail for position
|
||
|
array_length.
|
||
|
|
||
|
If \fIx\fR is unallocated, array_length and array_bytes return 0.
|
||
|
.SH "SEE ALSO"
|
||
|
array_allocate(3), array_get(3), array_fail(3), array_bytes(3)
|