面行に含まれる頂点トークン数を数え、扇形分割時の三角形数算出に使う。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | line |
|
integer(i32) pure function count_face_tokens(line) character(len=*), intent(in) :: line character(len=:), allocatable :: s integer :: pos, first, last s = trim(adjustl(line)) pos = 3 count_face_tokens = 0 do call next_face_token(s, pos, first, last) if (first > last) exit count_face_tokens = count_face_tokens + 1 end do end function count_face_tokens