LOCAL i : INTEGER; td : length_measure := 0; END_LOCAL; REPEAT i := 1 TO swsrh.segments; td := td + swsrh.segment_depths[i]; END_REPEAT; RETURN(td);