Open topic with navigation
WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
elements = %I_FLDDIM(window_id, field_spec)
An integer value indicating the number of elements. (^VAL)
The ID of the input window containing the field. (n)
The specification for the field whose dimension or number of elements %I_FLDDIM will retrieve. (See Field specifications for information.) (a)
%I_FLDDIM returns the number of elements for a field. If the field is not an array, the return value is 1, and if the field references a repository arrayed field element, the return value is 1. Though this function is useful in a variety of situations, it can be particularly useful as an argument to the L_FINDSPEC subroutine.
If either window_id or field_spec is invalid, a fatal error occurs.
You do not need to declare this function to use it. It is defined in tools.def.
In this example, the beginning position and length of the find area for the list identified by lstid are determined by the structure position and scope (size * dimension) of the field named in fndfield within the input window identified by inpid. A usual scenario would have inpid identify the input window associated with the list, and the input window set’s structure would also double as the data passed to the list processor.
xcall l_findspec(lstid,, %i_fldstrpos(inpid, fndfield), & %i_fldsize(inpid, fndfield)*%i_flddim(inpid, fndfield))