fieldCount (Object control)

Returns the number of fields in a list or a structure.

Arguments

list
is the object to count fields in, can be a builtin-list or a structure.

Return values

size
as a natural number.

Example

a: (1 2 3); b: {x:1.0; y: 2.0;}; c: {u:"A"; v:a;}; a fieldCount print LF print b fieldCount print LF print c fieldCount print
Output:
3 2 2