character*8::str integer::i do i=0, 999 print '(i3.3)',i read *,str if(LEN_TRIM(str).eq.8) then exit end if end do end program