%I_FLDSTRPOS
Retrieve an input field’s structure position
WTSupported in traditional Synergy on Windows
|
WNSupported in Synergy .NET on Windows
|
USupported on UNIX
|
VSupported on OpenVMS
|
struct_pos = %I_FLDSTRPOS(window_id, field_spec)
Return value
struct_pos
This function returns the position as an integer value. (^VAL)
Arguments
window_id
The ID of the input window containing the field. (n)
field_spec
The specification for the field whose structure position %I_FLDSTRPOS will retrieve. (See Field specifications for information.) (a)
Discussion
%I_FLDSTRPOS returns the starting character position of the field within its local or repository structure. If the field is not associated with a structure, the return value is zero. If the field was created from an element in repository arrayed field, %I_FLDSTRPOS returns the starting character position for the element (rather than the starting character position for the beginning of the array).
If either window_id or field_spec is invalid, a fatal error occurs.
This function may be particularly useful as an argument to the L_FINDSPEC subroutine, although it has a variety of uses.
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))