什么叫睡眠(1)在Fortran中意味着什么?

时间:2017-07-11 12:24:57

标签: fortran

      program democonstanta

      implicit none

c     constanta
      integer, parameter :: MIN_VALUE = 0
      integer, parameter :: MAX_VALUE = 100

c     var declaration
      integer :: i = MIN_VALUE      

      do while (i <=MAX_VALUE)
         write(*,'(a14)') "Please wait... "
         write(*,'(i3,a2)', advance='no') i, "%"
         call sleep(1)
         if (i .it. MAX_VALUE) then
            call execute_command_line("clear")
         end if
         i = i + 1
      end do

      call execute_command_line("clear")
      write(*,'(a3)') "End."

      end program democonstanta

1 个答案:

答案 0 :(得分:0)

参考:https://gcc.gnu.org/onlinedocs/gfortran/SLEEP.html

它只是睡眠(等待)一段时间。在你的情况下 - 一个。