TCOMES (STRID, LFN, RECURS, NEC, LECOMP)
INTEGER STRID INTEGER LFN INTEGER RECURS INTEGER NEC INTEGER LECOMP(NEC)
Depending on the value of the RECURS flag, counting can be "recursive" or not. When it is "recursive," counting is done in the file for all structures referenced by the structure STRID, in a recursive way (a structure j is referenced by a structure i, if an execute structure j structure element exists in structure i). So, if STRID is the head of a structure network and RECURS = PON, then all structures in this network will be counted in the file.
Only structure elements whose type is included in the LECOMP list will be counted in the structure. If the list is empty, only the total number of elements in the structure will be indicated.
The different types of elements are described in the standard PHIGS.H file by FORTRAN parameters and in the PHIGS documentation of the inquire element type and size function. Examples:
PEPL3 =2 polyline 3
PEPL =3 polyline
PEPM3 =4 polymarker 3
PEPM =5 polymarker
PETX3 =6 text 3
PETX =7 text
PEFAS3 =12 fill area set 3
PEFAS =13 fill area set
Examples of calls to the function TCOMES /* "recursive" count of structure 19 (3 types of element to count) */
NEC = 3
LECOMP(1)=PEEXST
LECOMP(2)=PELB
LECOMP(3)=PEFAS
CALL TCOMES (19,6,PON,3,LECOMP)
***** Count for structure 19 *********
Structure 19 : 5 element(s)
exec struct : 2 element(s)
label : 1 element(s)
fill area set : 0 element(s)
Structure 25 referenced by structure 19 12 element(s)
exec struct : 1 element(s)
label : 3 element(s)
fill area set : 7 element(s)
Structure 33 referenced by structure 25 6 element(s)
exec struct : 0 element(s)
label : 1 element(s)
fill area set : 1 element(s)
Structure 26 referenced by structure 19 3 element(s)
exec struct : 0 element(s)
label : 0 element(s)
fill area set : 0 element(s)
/* non "recursive"count of structure 25 */
CALL TCOMES (25,6,POFF,3,LECOMP)
***** Count for structure 25 *********
Structure 25 : 12 element(s)
exec struct : 1 element(s)
label : 3 element(s)
fill area set : 7 element(s)