dynlen()

Outputs the number of field elements

Synopsis

int dynlen(<dyn_type> x);

Parameters

Parameter Meaning
x dynamic field

Return Value

In the event of errors -1, otherwise the number of elements.

Errors

An error message is issued in the vent of a missing argument or if x is not an array.

Description

Returns the number of elements of the dynamic field x, in the event of errors -1 is returned.

The consistent use of lowercase of dynlen() follows that of strlen() and is not a printing error!

Example

main()
{
  dyn_int di;
  di=makeDynInt(120,1,2,3,4,5,6);
  DebugN("Length:",dynlen(di)); // results in 7
}

Assignment

Dynamic fields

Availability

CTRL