All Manuals > LispWorks® User Guide and Reference Manual > 39 The LW-JI Package

java-array-length Function

Summary

Returns the length of a Java array.

Package

lw-ji

Signature

java-array-length object => result

Arguments
object
A Java object.
Values
result
A non-negative integer or nil.
Description

The function java-array-length returns the length of object if this is a Java array. For multi-dimensional arrays, java-array-length returns the first dimension. If object is some other type of Java object, java-array-length returns nil. Otherwise it signals an error.

See also

java-array-element-type
15.4 Working with Java arrays


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:46