C Library Functions  - percent_bar (3)

NAME

percent_bar(3f) - [M_messages] print a simple progress bar repainting entire line (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Examples
Author
License

SYNOPSIS

SUBROUTINE percent_bar(progress)

    real,intent(in) :: progress

DESCRIPTION

Writes a simple progress bar from 0 to 100 percent.

OPTIONS

progress
  Value from 0.0 to 1.0 representing part of whole done.

EXAMPLES

Example program:

      program demo_percent_bar
      use M_messages, only : percent_bar
      implicit none
      integer :: arbitrary_max
      integer :: arbitrary_count
      real    :: percent
      real    :: old_percent
      arbitrary_max = 333
      percent = 0.00
      old_percent = -1.00
      do arbitrary_count = 1, arbitrary_max
          percent = real(arbitrary_count) / real(arbitrary_max - 1)
          if(old_percent /= percent) call percent_bar(percent)
          old_percent=percent
          call execute_command_line(’sleep 0.0’)
      enddo
      end program demo_percent_bar

Expected output:

AUTHOR

John S. Urban

LICENSE

Public License


Nemo Release 3.1 percent_bar (3) August 28, 2026
Generated by manServer 1.08 from b31b2b02-28d6-44df-9373-f6b7caeef8e7 using man macros.