Skip to content

__numfields__

builtin · libnexusinterp/nexus-value/ov-struct-proprietary.cc

: n = __numfields__ (s)

Return how many fields the structure s has.

The count depends only on the field layout, not on the number of elements in the array, so every element of a structure array has the same field count. The argument must be a structure; anything else raises an error.