'EXTRACT /LINE/CURLINE/'/* get the focus line contents and line number */ save_current_line = line.1 newline = '' Do i = 1 To Words(curline.3) /* get rid of all blanks in the line */ newline = newline||Strip(Word(curline.3,i)) End newline = Translate(newline) /* uppercase to match keywords */ stridx = 0 Do i = 1 To num_string /* find a keyword...*/ source = Word(string.i,1) length = Length(source) If Substr(newline,1,length) = source Then Do stridx = i Leave End End If stridx = 0 Then /* if no keyword found, error */ Do 'EMSG Unknown match string' Exit End 'preserve' num_source = 1 num_target = 0 source = Word(string.stridx,1) target = Word(string.stridx,2) direction = Word(string.stridx,3) Do Forever /* find matching keyword...*/ If direction = '>' Then 'N' Else 'U' If rc 0̄0 Then Leave 'EXTRACT /CURLINE/' newline = '' Do i = 1 To Words(curline.3) newline = newline||Strip(Word(curline.3,i)) End newline = Translate(newline) Select When Substr(newline,1,Length(source)) = source Then num_source = num_source + 1 When Substr(newline,1,Length(target)) = target Then num_target = num_target + 1 Otherwise End If num_source = num_target Then /* if match found...*/ Do 'reset block' 'mark line' /*...mark a line block */ ':'||save_current_line 'mark line' 'restore' Return End End 'EMSG No matching target' target 'found for' source ':'||save_current_line 'restore' Return