File speedo.icn

Summary

###########################################################################

	File:     speedo.icn

	Subject:  Procedure to indcate percentage of completion

	Author:   Robert J. Alexander

	Date:     May 2, 2001

###########################################################################

   This file is in the public domain.

###########################################################################

 speedo -- a "percentage complete" graphic indicator for 
 command-line-oriented user interfaces.

 This is a general facility that can function for anything, and a
 specific implementation for input files.

 The general implementation consists of two procedures:

       SpeedoNew -- Starts a speedo
       SpeedoValue -- Sets a new value for the speedo (non-decreasing)

 See FileSpeedo for an example of using the general facility.

 FileSpeedo is especially for input files.  Here is how to use it, by
 example:

   f := open("input_file") | stop("!!!")
   FileSpeedo(f,75,&errout)            # Start a file speedo, specifying
                                       # length and output file
   while read(f) do {
      FileSpeedo(f)                    # Keep it updated while reading file
      ...
      }
   FileSpeedo()                        # Finish up

###########################################################################
Procedures:
FileSpeedo, SpeedoNew, SpeedoValue

Records:
SpeedoRec

This file is part of the (main) package.

Source code.

Details
Procedures:

FileSpeedo(file, length, outFile, str)


SpeedoNew(max, length, file, str)


SpeedoValue(self, value)


Records:

SpeedoRec(max, length, file, lastOut, string)



This page produced by UniDoc on 2021/04/15 @ 23:59:54.